Page 1 of 1
Attributes on a File in Install Directory
Posted: Wed Oct 27, 2021 3:14 pm
by tpago
Hi,
So I have read about Actual Installer not changing the attributes of a file that is part of the installation for my application.
I made sure of this, and even Right Clicked this file, and went to Properties>Security and added "Everyone" and allowed "Full control" to this file.
I then built the installer and ran the application and the attributes are not the same as what I set them to. Any ideas on how to fix this.
Also, what is the command to make Security>Everyone>FullControl. Do you have an example of that please?
Thank you
Re: Attributes on a File in Install Directory
Posted: Thu Oct 28, 2021 1:12 pm
by Leo
You can change file attributes / permissions using System/Commands:
To change attributes(e.g. add Hide):
Code: Select all
Command: <SystemDir>\cmd.exe
Parameters: /C attrib +H "<InstallDir>\file.exe"
Timing: After Installation
More info:
https://ss64.com/nt/attrib.html
To change permissions (add Full Control):
Code: Select all
File: <SystemDir>\icacls.exe
Parameters: "<InstallDir>\File.exe" /grant:r Users:(OI)(CI)F /T
Launch on OS: All
Show: Normal
Timing: After Installation
Wait: No
More info:
https://ss64.com/nt/icacls.html
https://docs.microsoft.com/en-us/window ... nds/icacls
Re: Attributes on a File in Install Directory
Posted: Thu Oct 28, 2021 7:04 pm
by tpago
Hi Leo,
I cannot get it to work with these parameters:
"<InstallDir>\aVDSGridControlLayout.xml" /grant:r Users:(OI)(CI)F /T
Is there a way to make the whole install directory like this:
Everyone: Full Control
There are two files in the install directory that need these permissions because my application writes to them.
Thank you
Re: Attributes on a File in Install Directory
Posted: Thu Oct 28, 2021 7:38 pm
by tpago
Leo,
I also noticed that in General>Parameters>Install Product For:
All Userson computer (admin privileges required)
it installs the application to c:\Program Files\Widget App\ , but it fails because I need Full Control on those two files
but if i select "Current User Only" it installs it in C:\users\tony\appdata\roaming.... and it works, but I can't have it in that folder. I need it in c:\Program Files\Widget App\
How can I fix this.
I think part of the problem is that Actual Installer does not allow you to change file permissions on individual files when in Installation>Files and Folders like other installers do.
Re: Attributes on a File in Install Directory
Posted: Fri Oct 29, 2021 2:11 am
by Leo
Try this:
Code: Select all
File: <SystemDir>\icacls.exe
Parameters: "<InstallDir>" /grant:r Users:(OI)(CI)F /T
Launch on OS: All
Show: Normal
Timing: After Installation
Wait: No
And select the option "Run as Administrator" on the General / Parameters page.
Re: Attributes on a File in Install Directory
Posted: Fri Oct 29, 2021 12:21 pm
by tpago
Leo,
That worked.
Thank you Sir