Stuperman Posted January 18, 2008 Share Posted January 18, 2008 Is there any way to run commands that you would normally use in cmd but with script? Basically, here is the program: Send("#r") WinWait("Run") Send("net stop Messenger{Enter}") Send("#r") WinWait("Run") Send("sc config Messenger start= disabled{Enter}") Send("#r") WinWait("Run") Send("sc config ERSvc start= disabled{Enter}") Send("#r") WinWait("Run") Send("net stop ERSvc{Enter}") Send("#r") WinWait("Run") Send("net stop helpsvc{Enter}") Send("#r") WinWait("Run") Send("sc config helpsvc start= demand{Enter}") Send("#r") WinWait("Run") Send("net stop FastUserSwitchingCompatibility{Enter}") Send("#r") WinWait("Run") Send("sc config FastUserSwitchingCompatibility start= demand{Enter}") Send("#r") WinWait("Run") Send("net stop MDM{Enter}") Send("#r") WinWait("Run") Send("sc config MDM start= disabled{Enter}") Send("#r") WinWait("Run") Send("net stop VSS{Enter}") Send("#r") WinWait("Run") Send("sc config VSS start= manual{Enter}") Send("#r") WinWait("Run") Send("net stop idsvc{Enter}") Send("#r") WinWait("Run") Send("sc config idsvc start= disabled{Enter}") Send("#r") WinWait("Run") Send("net stop WMPnetworksvc{Enter}") Send("#r") WinWait("Run") Send("sc config WMPnetworksvc start= demand{Enter}") Send("#r") WinWait("Run") Send("net stop RemoteRegistry{Enter}") Send("#r") WinWait("Run") Send("sc config RemoteRegistry start= demand{Enter}") $rc = MsgBox(36,"Wireless","Does this computer connect to a wireless network?") If $rc = 6 Then Exit EndIf If $rc = 7 Then Send("#r") WinWait("Run") Send("net stop WZCSVC{enter}") Send("#r") WinWait("Run") Send("sc config WZCSVC start= demand{Enter}") EndIf I am just disabling services as kind of a beginning tweaking program. Please write back. Thanks. Link to comment Share on other sites More sharing options...
Developers Jos Posted January 18, 2008 Developers Share Posted January 18, 2008 (edited) 2 options: Write the commands you want to perform to a BAT file and RunWait() the batfile. Or something like: RunWait(@Comspec & ' /c net stop Messenger') etc.. Edited January 18, 2008 by Jos 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. Link to comment Share on other sites More sharing options...
Stuperman Posted January 18, 2008 Author Share Posted January 18, 2008 I guess I was looking for a way to do it without using command at all. Make it where the command windows won't pop up, it just does it. Anything like that? Link to comment Share on other sites More sharing options...
Developers Jos Posted January 18, 2008 Developers Share Posted January 18, 2008 (edited) You will have to use the cmd program but ofcourse can hide it RunWait(@Comspec & ' /c net stop Messenger',"",@SW_HIDE) Edited January 18, 2008 by Jos 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. 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