ajfoster Posted January 19, 2005 Posted January 19, 2005 I have the following script: If FileExists ("c:\winnt\system32\oemlogo.bmp") Then RunAsSet ("User", "Domain", "Password") filedelete("c:\winnt\system32\oemlogo.bmp") RunAsSet () Else EndIf It does not delete the oemlogo.bmp. In fact it doesn't appear to run the script. I also tried to add the following line in place of the filedelete line and i get an error. Runwait (@comspec & "/k" & "del c:\winnt\system32\oemlogo.bmp") I am trying to delete the file from the login script and the loged in user will not have access to delete but an admin will. Please help
Developers Jos Posted January 19, 2005 Developers Posted January 19, 2005 I have the following script:If FileExists ("c:\winnt\system32\oemlogo.bmp") Then RunAsSet ("User", "Domain", "Password") filedelete("c:\winnt\system32\oemlogo.bmp") RunAsSet () Else EndIfIt does not delete the oemlogo.bmp. In fact it doesn't appear to run the script. I also tried to add the following line in place of the filedelete line and i get an error.Runwait (@comspec & "/k" & "del c:\winnt\system32\oemlogo.bmp")I am trying to delete the file from the login script and the loged in user will not have access to delete but an admin will.Please help<{POST_SNAPBACK}>runasset sets the credentials for run & runwait, not the other commands.You need to have a space before and after the /k like: Runwait (@comspec & " /k del c:\winnt\system32\oemlogo.bmp") SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
ajfoster Posted January 19, 2005 Author Posted January 19, 2005 runasset sets the credentials for run & runwait, not the other commands.You need to have a space before and after the /k like: Runwait (@comspec & " /k del c:\winnt\system32\oemlogo.bmp")<{POST_SNAPBACK}>thanks, That worked
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