|
Answer» Hi Everyone: I Know how to stop service using batch file,
Code: [Select]NET STOP "IPOD Service" but I don't know yet how to change Start type from Automatic to MANUAL using batch. Could you give me advice, please?
I am not aware of anyway to do this with batch code, but you can create a VBScript and have it run from the command prompt:
Code: [Select]strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colListOfServices = objWMIService.ExecQuery _ ("Select * from Win32_Service Where Name = 'iPod Service'")
For Each objService in colListOfServices rc = objService.Change( , , , , "Manual") Next
Save the script with a VBS extension. Run from the command line as: CSCRIPT scriptname.vbs
Good LUCK. Type sc /? at a command prompt
or
Check this link: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sc.mspx?mfr=true
|