Inno Setup 6 PrivilegesRequiredOverridesAllowed selected will cause "install me only" access deny

730 views
Skip to first unread message

Clare Li

unread,
Jun 10, 2022, 2:11:42 AM6/10/22
to innosetup
After I setup PrivilegesRequiredOverridesAllowed to dialog, I click "install me only".
I cannot install the program, and it pop up "error 5 access denied"
If I click "install for all users", it can install complete for current user. But switch to another user account, the desktop and start menu cannot find the shortcut.


[Setup]
PrivilegesRequired=admin
PrivilegesRequiredOverridesAllowed=dialog

Wilenty

unread,
Jun 10, 2022, 4:58:54 PM6/10/22
to innosetup
So, use the:

DefaultDirName={autopf}\Your App Name

in the [setup]

instead of:

DefaultDirName={commonpf}\Your App Name

Clare Li

unread,
Jun 20, 2022, 3:07:10 AM6/20/22
to innosetup
Dear Wilenty,

I try DefaultDirName={autopf} to replace DefaultDirName={commonpf}, but it cannot work. "install for all users"---To switch to another user account, the desktop and start menu cannot find the shortcut.
"install me only"---"error 5 access denied" also pop up.
Wilenty 在 2022年6月11日 星期六凌晨4:58:54 [UTC+8] 的信中寫道:

Wilenty

unread,
Jun 20, 2022, 8:14:06 AM6/20/22
to innosetup
Hello,
did you checked the help about the Constants: https://jrsoftware.org/ishelp/index.php?topic=consts ?
Quote:
"Auto Constants

Besides the "common" and "user" constants, Inno Setup also supports "auto" constants. These automatically map to their "common" form unless the installation is running in non administrative install mode, in which case they map to their "user" form.

It is recommended you always use these "auto" constants when possible to avoid mistakes.
    Administrative    Non administrative
autoappdata    commonappdata    userappdata
autocf    commoncf    usercf
autocf32    commoncf32    usercf
autocf64    commoncf64    usercf
autodesktop    commondesktop    userdesktop
autodocs    commondocs    userdocs
autofonts    commonfonts    userfonts
autopf    commonpf    userpf
autopf32    commonpf32    userpf
autopf64    commonpf64    userpf
autoprograms    commonprograms    userprograms
autostartmenu    commonstartmenu    userstartmenu
autostartup    commonstartup    userstartup
autotemplates    commontemplates    usertemplates"

If yes, and it still not work as expected, please share a working example.

And please also check this topic: https://jrsoftware.org/ishelp/index.php?topic=admininstallmode
Reply all
Reply to author
Forward
0 new messages