Search found 3 matches

by Pyprohly
03 Mar 2018 07:46
Forum: DOS Batch Forum
Topic: detect batch launching method (prompt or icon double-click)
Replies: 13
Views: 12688

Re: detect batch launching method (prompt or icon double-click)

Did you see the thread Squashman linked to? The WMIC calls are a little slow but aGerman’s idea of checking the parent process seems pretty robust. @echo off goto :main :get_pid [OutVar] setlocal for /f "skip=1" %%I in (' wmic process Where "Name='cmd.exe'" Get ParentProcessId ') do for %%J in (%%I)...
by Pyprohly
04 Nov 2017 12:24
Forum: DOS Batch Forum
Topic: Help creating and implementing "switches" or "options" in custom batch script
Replies: 6
Views: 6075

Re: Help creating and implementing "switches" or "options" in custom batch script

I think I have a good solution going. Here’s the parameter system I use, or at least what I would use if I ever had any good ideas for large projects :cry: ::: !my_cmd! first second [third] [/key:value] [/nintendo] ::: ::: Synopsis: ::: These auxiliary functions streamline the process of argument pa...
by Pyprohly
04 Jan 2015 22:22
Forum: DOS Batch Forum
Topic: Start process WITHOUT admin privileges via an elevated CMD
Replies: 1
Views: 2640

Start process WITHOUT admin privileges via an elevated CMD

Hi there, I'm wondering if it's possible to do what the title describes. When on the builtin Administrator account on Windows 7, every process that is opened is automatically admin privileged. I'm okay with that, it's called an 'Administrator' account after all, but at rare times I would like to int...