This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: file permission with CACLS
Subscribe
- 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
‎Mar 12, 2008
01:39 AM
file permission with CACLS
Hi,
I am new to installshield. I need to give modify permission to a file in installshield. I tried modifying the permissions in the installshield, but it replaces the existing permissions with the new one. I need to add the modify permissions to the users.
Can anyone help me out to solve this issue?
Thanks in advance.
Gomathy.
I am new to installshield. I need to give modify permission to a file in installshield. I tried modifying the permissions in the installshield, but it replaces the existing permissions with the new one. I need to add the modify permissions to the users.
Can anyone help me out to solve this issue?
Thanks in advance.
Gomathy.
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 12, 2008
05:43 AM
create a custom action to launch cacls command
cacls DirName /E /G Username:F
the /E switch edits the permisson instead of replacing. For more help type cacls at command prompt.
cacls DirName /E /G Username:F
the /E switch edits the permisson instead of replacing. For more help type cacls at command prompt.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 12, 2008
06:02 AM
Hi,
Thanks for ur suggestion. I know the syntax of CACLS command. But I donno how to include it in the custom action. Which option to choose when i run custom action wizard in installshield.
Gomathy.
Thanks for ur suggestion. I know the syntax of CACLS command. But I donno how to include it in the custom action. Which option to choose when i run custom action wizard in installshield.
Gomathy.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 12, 2008
06:13 AM
create a custom action of type exe with path stored in property. Create a property in property manager which has following value.
cacls DirName /E .... etc.
In the custom action specify this property.
cacls DirName /E .... etc.
In the custom action specify this property.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 12, 2008
04:43 PM
Make sure your customers are using the NTFS file system; using cacls in a custom action on a FAT32 partition will cause an install failure (obviously). Just one minor issue we hit.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 13, 2008
06:01 AM
Hi,
I have created the property and the custom action. But how can i specify my file name in the command.
My command is
"CACLS C:\Program Files\Application\1.txt /E /G BUILTIN\Users:C"
The installation path could be anything.. the file is placed during installation. How can I specify the file name here?
:confused:
I have created the property and the custom action. But how can i specify my file name in the command.
My command is
"CACLS C:\Program Files\Application\1.txt /E /G BUILTIN\Users:C"
The installation path could be anything.. the file is placed during installation. How can I specify the file name here?
:confused:
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 13, 2008
10:29 AM
You can create a InsallScript Function and execute it through a custom action.
function AddFolderPermissions(hMSI)
STRING szCommandLine;
NUMBER nvSize;
STRING svDir,svExtranetDir;
NUMBER nvResult;
#define PROGRAM WINSYSDIR^"CACLS "
begin
try
//Get InstallDir
nvSize = 256;
nvResult = MsiGetProperty(hMSI, "INSTALLDIR", svDir, nvSize);
svExtranetDir = svDir ^ "TBExtranet";
szCommandLine = "\"" + svExtranetDir + "\" /T /E /G \"TheBooks_WEBUsers\":F";
if (LaunchAppAndWait (PROGRAM,szCommandLine, LAAW_OPTION_MINIMIZED) < 0) then
MessageBox ("Unable to launch cacls program: " + szCommandLine,SEVERE);
endif;
catch
MessageBox("Exception: AddFolderPermissions(hMSI), " + Err.Description + Err.Number, SEVERE);
abort;
endcatch;
end;
function AddFolderPermissions(hMSI)
STRING szCommandLine;
NUMBER nvSize;
STRING svDir,svExtranetDir;
NUMBER nvResult;
#define PROGRAM WINSYSDIR^"CACLS "
begin
try
//Get InstallDir
nvSize = 256;
nvResult = MsiGetProperty(hMSI, "INSTALLDIR", svDir, nvSize);
svExtranetDir = svDir ^ "TBExtranet";
szCommandLine = "\"" + svExtranetDir + "\" /T /E /G \"TheBooks_WEBUsers\":F";
if (LaunchAppAndWait (PROGRAM,szCommandLine, LAAW_OPTION_MINIMIZED) < 0) then
MessageBox ("Unable to launch cacls program: " + szCommandLine,SEVERE);
endif;
catch
MessageBox("Exception: AddFolderPermissions(hMSI), " + Err.Description + Err.Number, SEVERE);
abort;
endcatch;
end;