Jump to content

Command issues


Recommended Posts

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

  • Developers

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

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

  • Developers

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...