Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with batch file

Status
Not open for further replies.

Briandr

MIS
Jul 11, 2003
177
US
Windows 7 O.S. I need to clear the HardwareID inside the registry for Symantec Endpoint Protection 11. I am using the following script:

@echo on
start /wait smc -stop
reg import "HardwareID.reg"
Del "c:\program files\Common Files\Symantec Shared\HWID\sephwid.xml"
start /wait smc -start

The script gets hung up when it attempts run 'start /wait smc -start'. The other lines of code prior to that work correctly.

Any ideas as to what could be going on with this relatively small and simple script? I am skeptical on the 'start /wait' command because from what I have read online it may not behave as designed. I am not sure why SEP 11 is having issues starting back up.

Thanks.
 
Don't know exactly what smc is/does, but I'm guessing once you tell it to start (-start) then it keeps running, no?

In that case the /wait parameter seems inappropriate, because it tells the batch file to wait until smc stops.

Presumably it dutifully does so, and thus "hangs".

I'm guessing if you open another cmd window and tell smc to stop the first one will then terminate.

Jock
 
Agree on both counts.

forum1726 would be a better place since you are doing this in Windows 7

And also agree on the fact that if you are telling the start command to wait, it will wait/hang until the started command ends.

As per the start command's Help screen [ start /? ]
Start Help said:
WAIT Start application and wait for it to terminate.

Its doing exactly what you are telling it to do.

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
Hi,

I realized after the fact I posted in the wrong forum. Sorry about that. I think Start /wait is needed for the second line to make sure Symantec Endpoint Protection 11 has terminated. For the last line of the script I probably don't need the start /wait. I also think there may be other services that need to be stopped. Perhaps I need to look into using SC to stop all of them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top