ajfoster Posted August 20, 2004 Posted August 20, 2004 I need to run the following command as an administrator. I know how to do the runasset part but what I don't know is how to include the command using @comspec. secedit /configure /cfg %windir%\repair\secsetup.inf /db secsetup.sdb /quiet /areas USER_RIGHTS That should be all one command. It is supposed to reset the security settings to ms defaults
Developers Jos Posted August 20, 2004 Developers Posted August 20, 2004 $rc = runwait(@comspec & " / c secedit.exe /configure /cfg " & @WindowsDir & "\repair\secsetup.inf /db secsetup.sdb /quiet /areas USER_RIGHTS") 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 August 23, 2004 Author Posted August 23, 2004 $rc = runwait(@comspec & " / c secedit.exe /configure /cfg " & @WindowsDir & "\repair\secsetup.inf /db secsetup.sdb /quiet /areas USER_RIGHTS") <{POST_SNAPBACK}>This still gives error message. Error: Unable to execute the external program. the system cannot find the file specified.
Developers Jos Posted August 23, 2004 Developers Posted August 23, 2004 This still gives error message. Error: Unable to execute the external program. the system cannot find the file specified. <{POST_SNAPBACK}>Looks like i have a typo, there is a space between "/ c" ... try this version: $rc = runwait(@comspec & " /c secedit.exe /configure /cfg " & @WindowsDir & "\repair\secsetup.inf /db secsetup.sdb /quiet /areas USER_RIGHTS") When it doesn't work you can check the following: - is the secedit.exe in you standard seach path.. iow... can you runn it from the cmd prompt? - run the above command with /k in stead of /c for testing. it will leave the cmd window open. 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 August 23, 2004 Author Posted August 23, 2004 Looks like i have a typo, there is a space between "/ c" ... try this version: $rc = runwait(@comspec & " /c secedit.exe /configure /cfg " & @WindowsDir & "\repair\secsetup.inf /db secsetup.sdb /quiet /areas USER_RIGHTS") When it doesn't work you can check the following: - is the secedit.exe in you standard seach path.. iow... can you runn it from the cmd prompt? - run the above command with /k in stead of /c for testing. it will leave the cmd window open. <{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