|
|
#1 |
|
Junior Member
Join Date: Oct 2001
Posts: 13
|
exec command questions
Hi
i want to run a programm minimized. exec seems not to support this. At th moment i have to create a batch file using the "start" command. This also is capable of setting process priority. Is there any way doing this with native nsis commands? |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Sep 2002
Location: At [4C69:6E6B]
Posts: 561
|
Use this:
PHP Code:
Here you can find the syntax. - Claudia Pelsmaeker |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Oct 2001
Posts: 13
|
I've tested execshell with "open" but the programm didn't start
|
|
|
|
|
|
#4 |
|
Major Dude
Join Date: Sep 2002
Location: At [4C69:6E6B]
Posts: 561
|
Try an empty zero-length string "". Everywhere I look, it says that in order to run a program, you must use an empty string. I can't test it right now.
- Claudia Pelsmaeker |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Oct 2001
Posts: 13
|
This don't work either. Unfortunately ".exe" doesn't appear in the extension association in the explorer settings. Therefore i think it can only be "executed". But then there should be a way to change the status Maximized, normal or minimized like in shortcuts
|
|
|
|
|
|
#6 |
|
Major Dude
Join Date: Sep 2002
Location: At [4C69:6E6B]
Posts: 561
|
I know. I didn't find it there eighter. But in Visual Basic, there is a very similar API command called ShellExecute. That does virtually the same and works the same.
I found some more information about this function here, and it states that you can use the "open" action for documents, files and executables. Please post your code here, or at least the error you get, and where. Do you get the error when compiling the script, or when you run the script, or doesn't the exe start at all, without any messages? - Claudia Pelsmaeker |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Oct 2001
Posts: 13
|
mmh I didn't checked the state of errors yet but i can say that the script compiles without error but it seems that the exe wasn't executed but i will use the iferrors for testing purposes but i check for his later
|
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Oct 2001
Posts: 13
|
i've checked again on another XP maschine the following
ExecShell "" "[exename]" SW_SHOWMINIMIZED The Programm was started but not minimized |
|
|
|
|
|
#9 |
|
Major Dude
Join Date: Sep 2002
Location: At [4C69:6E6B]
Posts: 561
|
I think you should ask KiCHiK, for example, by PM-ing him: Click here!.
- Claudia Pelsmaeker |
|
|
|
|
|
#10 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
Does it work without SW_SHOWMINIMIZED?
Are you using a full path (F:\bla\bla\prog.exe instead of prog.exe)? NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#11 |
|
Junior Member
Join Date: Oct 2001
Posts: 13
|
i'm using
ExecShell "" "$EXEDIR\exename" SW_SHOWMINIMIZED and as i said the program starts but not minimized |
|
|
|
|
|
#12 | |
|
Senior Member
|
Quote:
You didn't pass the empty paramater string in that example. |
|
|
|
|
|
|
#13 | |
|
Junior Member
Join Date: Oct 2001
Posts: 13
|
Quote:
|
|
|
|
|
|
|
#14 |
|
Major Dude
Join Date: Sep 2002
Location: At [4C69:6E6B]
Posts: 561
|
The compiler cannot guess that SW_SHOWMINIMIZED is the fourth parameter when you type it as being the third.
- Claudia Pelsmaeker |
|
|
|
|
|
#15 |
|
Junior Member
Join Date: Oct 2001
Posts: 13
|
this works:
ExecShell "" "$EXEDIR\exename.exe" "" SW_SHOWMINIMIZED but the docs don't say that empty parameter is necessary to use the state nevertheless is was my fault sorry guys |
|
|
|
|
|
#16 |
|
Major Dude
Join Date: Sep 2002
Location: At [4C69:6E6B]
Posts: 561
|
That's because the writers of the docs are experienced C++, NSIS, Java, VB programmer's that forget things that are very normal and common for them, like knowing that you always have to fill in a parameter even when it's not used.
I deal with it all the time myself. I help people with Windows computer problems via the phone or e-mail and forget that very basic things like knowing how to open the context menu of a file or browsing for a folder are not known with those users. - Claudia Pelsmaeker |
|
|
|
|
|
#17 |
|
Senior Member
|
I don't know how to describe it any better. When the 5th parameter is required, obviously you can't pass it as the 4th parameter.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|