![]() |
#1 |
Junior Member
Join Date: Dec 2019
Posts: 3
|
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 |
![]() |
![]() |
![]() |
#2 |
Junior Member
Join Date: Dec 2019
Posts: 3
|
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) |
![]() |
![]() |
![]() |
#3 | |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,356
|
Are you installing to Program Files or some other directory? Program Files should have a correct ACL by default.
Start cmd.exe and run Quote:
IntOp $PostCount $PostCount + 1 |
|
![]() |
![]() |
![]() |
#4 | |
Junior Member
Join Date: Dec 2019
Posts: 3
|
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. Quote:
|
|
![]() |
![]() |
![]() |
#5 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,356
|
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. IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
|
Tags |
uac |
Thread Tools | Search this Thread |
Display Modes | |
|
|