The following VBScript will do it strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colServiceList = objWMIService.ExecQuery _ ("Select * from Win32_Service where displayname = 'OracleServiceORCL9'") For Each objService in ColServiceList errCode = objService.Change(, , , , "Manual") Next put this into a file called 'manual.vbs' and call it using 'cscript' in your batch file (i.e. cscript manual.vbs). Change the service name to the proper service name....this code worked fine on my XP Pro install BTW.... You could also paramaterize this one script so that it does manual and auto. I leave that for you to do. HTH Jeff Herrick Quoting "J. Dex" <cemail_219@xxxxxxxxxxx>:
Is there a way to change the "running services" status in the "Services" window from Automatic to Manual via a batch script? I have a batch script that uses oradim to shutdown/startup my 9207 databases on a WIN2003 server but don't know how to change the status from automatic to manual in the event the server administrator wants to reboot the machine a couple of times before I have the databases restart. My oradim command in the batch job looks like this: oradim -shutdown -sid dbsid -shutmode I -shuttype SRVC >> %BASELOGS%\oracle_shutdown.log _________________________________________________________________ http://newlivehotmail.com -- //www.freelists.org/webpage/oracle-l
-- //www.freelists.org/webpage/oracle-l