Skip to content
⌘ NSIS Forum Archive

Acces denied for Windows 10 shortcut

5 posts

Alan#

Acces denied for Windows 10 shortcut

I am getting an "Access Denied" message when trying to use the desktop shortcut created in Windows 10 with NSIS. The same with the alphabetical menu.
I had not such problem with Vista and Windows 7, so it is probably related to Windows 10.
I have found that the Security for this shortcut and the program directory created with NSIS is set to special and has no read or execute rights.
I can change this manually, but I am afraid the same will happen to other people to which I distribute my program.
Has anybody encountered this?
Any help will be appreciated.

Thank you
Alan#
Some more info
I am using NSIS 3.04
In my script I have
RequestExecutionLevel admin
SetShellVarContext all

Even if I turn Win10 UAC off, I still get the same

System, Administrator get their access rights OK
My acount which is the owner/creator (even if I am administrator) get special rights ( which has no rights defined)
Anders#
Are you installing to Program Files or some other directory? Program Files should have a correct ACL by default.

Start cmd.exe and run
cacls "c:\Program Files"
(or whatever the directory is)
Alan#
I think I found my problem
On startup, my program was trying to write a config file to Program files x 86\MyProgram and I think this is not allowed by windows.
I will have to modify it to write to AppData or ask users to install it to another directory.
Thank you anyhow.

C:\Program Files
NT SERVICE\TrustedInstaller:F
NT SERVICE\TrustedInstaller🙁CI)(IO)F
NT AUTHORITY\SYSTEM:C
NT AUTHORITY\SYSTEM🙁OI)(CI)(IO)F
BUILTIN\Administrateurs:C
BUILTIN\Administrateurs🙁OI)(CI)(IO)F
BUILTIN\Utilisateurs:R
BUILTIN\Utilisateurs🙁OI)(CI)(IO)(accès spécial*🙂
GENERIC_READ
GENERIC_EXECUTE

CREATOR OWNER🙁OI)(CI)(IO)F
APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES:R
APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES🙁OI)(CI)(IO)(accès spécial*🙂
GENERIC_READ
GENERIC_EXECUTE

APPLICATION PACKAGE AUTHORITY\TOUS LES PROGICIELS D'APPLICATIONS AVEC RESTRICTIONS:R
APPLICATION PACKAGE AUTHORITY\TOUS LES PROGICIELS D'APPLICATIONS AVEC RESTRICTIONS🙁OI)(CI)(IO)(accès spécial*🙂
GENERIC_READ
GENERIC_EXECUTE
Anders#
Correct, your program is not allowed to write to its install directory when it is installed for all users.

If your app is not marked as UAC compatible then Windows might allow the write by redirecting the file for that user, this is called UAC Virtualization: https://www.microsoftpressstore.com/...8450&seqNum=9#. I don't know if Windows 10 supports this but Vista, 7 and 8 does.