Old 17th October 2011, 21:26   #1
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
determine comandline call of task

with process explorer (sysinternals) i can see it, but how to with nsis?

eg task/name "explorer.exe" commandline: "explorer.exe /e c:\" started from: blah

WMIC from windows can list all processes but cannot handle wildcards.

cheers.

Greets, Brummelchen
Brummelchen is offline   Reply With Quote
Old 18th October 2011, 00:31   #2
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Why does your NSIS installer need to obtain the command-line of another process?

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Old 18th October 2011, 20:27   #3
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
i dont write installers, i code some other stuff for me.

with WMIC i need to use an array and filtering - not smart.
Brummelchen is offline   Reply With Quote
Old 18th October 2011, 21:41   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
Why is there no supported way to get the command line of another process?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 18th October 2011, 22:03   #5
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
ofc - or not ► http://www.autoitscript.com/forum/to...nning-process/
Brummelchen is offline   Reply With Quote
Old 18th October 2011, 22:45   #6
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Quote:
For 32-bit processes running on x86 systems, the PEB is "generally" located at 0x7ffd6000. At an offset of 0x10 bytes from the start of the PEB, you will find the pointer to the RTL_USER_PROCESS_PARAMETERS structure. The pointer to the unicode string containing the command line is located at an offset of 0x040 from the start of the RTL_USER_PROCESS_PARAMETERS structure.
Having to dig in another process's memory to dump a data structure whose exact location is not officially documented and may be subject to change in future operating system versions sounds a bit "dubious" to me. The WMI method feels more credible to me...

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump