Jump to content

FileSetAttribute in C:\Program Files?


Recommended Posts

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

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]
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...