3

Folk,

I need to bypass UAC, through my Installer. Please note I am using InnoSetup/NSIS/Advanced Installer. I have tried all settings like SILENT / VERYSILENT but nothing has worked.

Help me out :)

Regards

Subh

Subh
  • 414
  • 6
  • 14
  • 1
    What do you mean with bypass ? Without some serious hack you won't be able to workaround UAC at all. You can run your installer with lower rights if you set the [`PrivilegesRequired`](http://www.jrsoftware.org/ishelp/index.php?topic=setup_privilegesrequired) to a value different from `admin`, which is the default value. That will stop showing the UAC dialog for admin rights, but as a consequence, you won't be able to write e.g. to a Program Files directory (but there's more than this). – TLama Jun 21 '13 at 06:50

3 Answers3

3

You cannot bypass UAC, the user is in control, that is the whole point of UAC! If you want to do machine wide changes that require Administrator privileges there is no way around it.

The only way to avoid it is to do per-user installs into [local]appdata & HKCU (Like Chrome etc). To avoid legacy setup detection you should use PrivilegesRequired/RequestExecutionLevel and only ask for lower/user privileges...

Anders
  • 97,548
  • 12
  • 110
  • 164
0

Thanks guys :)

I guess I fave found one solution of it, like If I do the following before Installing my EXE for temporary then on post Installation I revert it. then, I hope my purpose get solved.

[Registry] Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"; ValueType: dword; ValueName: "ConsentPromptBehaviorAdmin"; ValueData: "0x00000000"

If anybody like to discuss on this ,

Here I am at skype : subh.anand

Subh
  • 414
  • 6
  • 14
  • 3
    You will need tho elevate the process to write to this key and for this the UAC prompt will be shown. – Carlos Beppler Jun 25 '13 at 19:06
  • Yes very true, thanks for your comment .. I can do it through Installation script. – Subh Jun 27 '13 at 08:34
  • That's very bad way and I hope I won't meet such installer. Consider the situation if the setup unexpectedly crash and this setting will remain set in user's registry. – TLama Jun 27 '13 at 09:57
  • Do you know any other way to do this, please share with us .. Thanks in advance. :) – Subh Jun 27 '13 at 11:39
0

Go to Settings, Recovery, Advanced Restart. Press Trobleshoot, More Options, and Command Prompt. Then type in ren Utilman.exe Utilman1.exe ren cmd.exe Utilman.exe. Then go to the login screen, click the dotted power button and you have an admin command prompt!

Rupert M-M
  • 21
  • 3