cancel
Showing results for 
Search instead for 
Did you mean: 
sasikumar
Active participant

UnauthorizedAccessException in Installscript project

Jump to solution

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

 

Labels (1)
0 Kudos
1 Solution

Accepted Solutions
Flexera banna_k
Flexera

Re: UnauthorizedAccessException in Installscript project

Jump to solution

Hi @sasikumar 

 

How to set folder permission with cacls, there were already one query.

https://community.flexera.com/t5/InstallShield-Forum/How-to-set-folder-permissions-with-cacls/m-p/84...

 

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

6 Replies
Flexera banna_k
Flexera

Re: UnauthorizedAccessException in Installscript project

Jump to solution

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"

0 Kudos
Flexera banna_k
Flexera

Re: UnauthorizedAccessException in Installscript project

Jump to solution

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

 

0 Kudos
Highlighted
Flexera Jenifer
Flexera

Re: UnauthorizedAccessException in Installscript project

Jump to solution

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:

https://helpnet.flexerasoftware.com/installshield19helplib/helplibrary/SecurityPermissions.htm#Speci...

 

Thanks,

Jenifer

0 Kudos
sasikumar
Active participant

Re: UnauthorizedAccessException in Installscript project

Jump to solution

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

 

 

0 Kudos
Flexera banna_k
Flexera

Re: UnauthorizedAccessException in Installscript project

Jump to solution

Hi @sasikumar 

 

How to set folder permission with cacls, there were already one query.

https://community.flexera.com/t5/InstallShield-Forum/How-to-set-folder-permissions-with-cacls/m-p/84...

 

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

sasikumar
Active participant

Re: UnauthorizedAccessException in Installscript project

Jump to solution

Hi @banna_k ,

Thank you for the solution.It's working for my requirement.

with regards,

Sasikumar.A

 

0 Kudos