Jump to content

Recommended Posts

Posted

I need to change a file from read only that's installed with an MSI installer. So far I can run the MSI silently, but I'm wondering how I change the file attribute of a file in

C:\Program Files (x86)\Program\file

with FileSetAttribute when it says the file match can't contain spaces ...?

Posted (edited)

The helpfile needs an update, the function works with both directories with spaces in their names, and filenames containing spaces.

Edited by Spiff59
Posted (edited)

BTW you can use this way too.

RunWait("cmd.exe /c " & "attrib -R -H -S " & """" & @ProgramFilesDir&"\file\somefile.exe" & """",@ScriptDir,@SW_HIDE)

or

RunWait("cmd.exe /c " & "attrib -R -H -S " & """" & "%programfiles%\file\somefile.exe" & """",@ScriptDir,@SW_HIDE)

This works for me in win xp sp2

edit:spell

Edited by Sh3llC043r
[size="5"] [/size]

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...