jp10558 Posted April 19, 2010 Share Posted April 19, 2010 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 ...? Link to comment Share on other sites More sharing options...
Spiff59 Posted April 19, 2010 Share Posted April 19, 2010 (edited) The helpfile needs an update, the function works with both directories with spaces in their names, and filenames containing spaces. Edited April 19, 2010 by Spiff59 Link to comment Share on other sites More sharing options...
Fire Posted April 19, 2010 Share Posted April 19, 2010 (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 April 19, 2010 by Sh3llC043r [size="5"] [/size] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now