|
|
#1 |
|
Junior Member
Join Date: Mar 2012
Posts: 2
|
Execwait doesnt working in Windows 7
Hi,
I want to call an exe to execute using nsis. To execute the exe i have used code as follow SetOutPath $INSTDIR\SoundBite File Files\DotNetInstall.bat File Files\dotNetFx40_Full_x86_x64.exe Execwait '"$INSTDIR\SoundBite\dotNetFx40_Full_x86_x64.exe" /norestart' after compiling .nsi file it creates an exe file. But executing that .exe file it doesnt start the dotNetFx40_Full_x86_x64.exe (setup file) same its working in Windows XP but doesnt working in Windows 7. So please suggest me how can I execute the same in windows 7. |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
|
Your syntax looks correct. But does your installer use "RequestExecutionLevel admin" ???
If not, then it's probably UAC which is causing the problem here! ExecWait is implemented via CreateProcess(), which will simply fail if the calling application is not elevated and tries to run an executable that needs elevation (which the .NET installer probably does!). Alternatively you may want to try ExecShell, which will not fail but trigger an UAC Dialog in that case. ExecShell doesn't support waiting though. Therefore I have implemented an ExecShell function with Wait-capability in my StdUtils plug-in. This will allow you to run an elevated process (e.g. the .NET installer) from a non-elevated NSIS installer and still wait for it. I use that in my Auto Updater tool, for example... See here: http://nsis.sourceforge.net/StdUtils...#ExecShellWait My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc My source of inspiration: http://youtu.be/lCwY4_0W1YI |
|
|
|
|
|
#3 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
(Keep in mind that 'requestexecutionlevel admin' is NOT sufficient to get administrator access in your installer. You need to manually confirm admin access in .onInit using UserInfo plugin.)
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|