3

we can detect it - Disable silent and verysilent uninstall in Inno Setup uninstall-in-inno-setup and try to rerun with

ExecAsOriginalUser(ExpandConstant('{srcexe}'), '', '', SW_SHOWNORMAL, ewNoWait, 0);

But it does not run anything in this case. Any ideas how to rerun installer in normal mode when silent install detected?

Community
  • 1
  • 1
ro_jero
  • 115
  • 10
  • That was my blind, untested proposal which doesn't work (Deanna has a note about it as well). `Exec` as well as `ExecAsOriginalUser` returns `ERROR_ACCESS_DENIED` error code, when you attempt to run the setup binary from code, and I would suggest to make a temporary batch file and run the setup from there. Although, I'm not sure if you can run an executable from a batch file with the same privileges as the batch invoker. – TLama Mar 20 '13 at 14:06
  • I've just corrected my original answer to use `ShellExecAsOriginalUser()` that should elevate properly (still untested). I recomend deleting this question if it now works or I'll close as a duplicate. – Deanna May 13 '13 at 11:39

0 Answers0