I created a VBScript, which gives RW permissions in C:\Windows and COmmonFilesFolders in Windows 7. When I run the VBScript manually it works great  but When I include the same VBScript in msi the permission are never created. Any suggestions please. 

2 Comments   [ + ] Show Comments


  • HI Mukesh ,have you sequenced the custom action ? ,i suggest you to add a message box and check weather the script is being triggered or not.
  • Giving write permission to users is not a good practice.Please use Processmon and check the required standalone folder and try giving permissions to that folder alone.
Please log in to comment

Community Chosen Answer


Why do you want to give Write permission to C:\Windows and CommonFilesFolder??????????

I strongly do not recommended this approach..

There should be some other workaround to make your application work without giving permission to these folders..

Answered 01/15/2013 by: jagadeish
Red Belt

  • Use ProcMon and identify which folders and files need permission exactly.
  • Files placed into these directories should be installed only by an Administrator. A regular user should not be writing to these directories during application usage. Any writes should take place within the users AppData or Common ProgramData folder. Otherwise, your application is compromising the stability and security of your system.

    One thing with VB Script in custom actions in InstallShield is where to place it in the sequence. Also, removing script such as Wscript.CreateObject replacing it with just CreateObject.

    A sample of your Custom Action would provide better support.
Please log in to comment



Besides Jagadeish answer...

How did you add the VBscript in the first place, did you add this into a sequence?

Where exactly?

any conditions added?

If you use AdminStudio, why not using the Installshield Permission Handling. (much better)

Last by not least, WHY RW permissions in such generic locations?


Answered 01/16/2013 by: jaybee96
Red Belt

Please log in to comment

could you post the code used in the customaction?

I have a suspicion of what the issue might be, but I would need to see your code

Answered 01/17/2013 by: pjgeutjens
Red Belt

  • Giving Permissions Modify Permissions to users on SYSTEM Folder is no recomended action as the action makes the system unstable.
    USe strCommondline = "cacls " & Chr(34) & destination Foldername & Chr(34) & " /T /E /G " & chr(34) & Usergroup(34) & ":" & C
Please log in to comment
Answer this question or Comment on this question for clarity