Sign in to follow this  
Followers 0
Stuperman

Command issues

4 posts in this topic

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.

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

You will have to use the cmd program but ofcourse can hide it :D

RunWait(@Comspec &  ' /c net stop Messenger',"",@SW_HIDE)
Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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
Sign in to follow this  
Followers 0