- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- UnauthorizedAccessException in Installscript project
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi,
I have a problem with access denied for App_data folder to create the SQL lite file for my application.
I'm installing the application using InstallScript project type. I don't get an option for read/write folder permission as we have in Install Script MSI project type.
When I manually provide the permission to the folder.It is working fine.
Can anyone provide me with a solution ? Thanks in advance.
with regards,
Sasikumar.A
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @sasikumar
How to set folder permission with cacls, there were already one query.
cacls is a windows command, you can find more information on the below link:
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/cacls_1
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @sasikumar ,
See whether you can overcome the access permission error by changing the execution level of your setup.exe. ( Media->Releases->Product Configuration 1->Release 1->Required Execution Level)
If it is not working, you can try changing the Folder Permissions from the folder properties view (Application Data->Files and Folders ->Right click on the folder created->Select Properties )
Else, the folder permissions can be changed by executing below command through the script
"https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/cacls_1"
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @sasikumar ,
See whether you can overcome the access permission error by changing the execution level of your setup.exe. ( Media->Releases->Product Configuration 1->Release 1->Required Execution Level)
If it is not working, you can try changing the Folder Permissions from the folder properties view (Application Data->Files and Folders ->Right click on the folder created->Select Properties )
Else, the folder permissions can be changed by executing "cacls" windows command through the script
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @banna_k ,
Thank you for the response. Please find below reply to your suggestion.
Option 1: I tried the first option mentioned by you. it's not working
Option 2: That is applicable for windows installer.
Option 3 : DO you have any sample example of how to use "cacls" ? Please let me know.
Manually if I give "Everyone" write permission to my root folder. it's working. Thanks
with regards,
Sasikumar.A
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @sasikumar
How to set folder permission with cacls, there were already one query.
cacls is a windows command, you can find more information on the below link:
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/cacls_1
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @sasikumar ,
You can use SetObjectPermissions function in InstallScript project:
SetObjectPermissions, an InstallScript Function—You can use the SetObjectPermissions function in InstallScript events and InstallScript custom actions to set permissions at run time. |
The below link can help you to get more insights:
Thanks,
Jenifer