roadrunner Posted November 9, 2004 Posted November 9, 2004 This must be really simple but I can't work it out all Ii want to do is change the file attribute to read only but without hard coding the drive letter. if I use the following code it works ok FileSetAttrib("c:\program files\Webroot\Spy Sweeper\test.ini","+R") If @error Then MsgBox(4096,"Error", "Problem setting attributes." but use this and it want set it to read only $varhome = @ProgramFilesDir FileSetAttrib("$varhome &\Webroot\Spy Sweeper\test.ini","+R") If @error Then MsgBox(4096,"Error", "Problem setting attributes." any idears ?
scriptkitty Posted November 9, 2004 Posted November 9, 2004 (edited) $varhome = @ProgramFilesDirFileSetAttrib("$varhome &\Webroot\Spy Sweeper\test.ini","+R")If @error Then MsgBox(4096,"Error", "Problem setting attributes."$varhome = @ProgramFilesDir FileSetAttrib($varhome & "\Webroot\Spy Sweeper\test.ini","+R") If @error Then MsgBox(4096,"Error", "Problem setting attributes.") Edited November 9, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers.
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