Advertisement

08.13.2008 at 01:43PM PDT, ID: 23646221 | Points: 500
[x]
Attachment Details

Reg Query / Reg Add from Windows Profile Login Script (.bat file)

Asked by pc-plus in Windows Batch Scripting, Windows XP Operating System, Microsoft Operating Systems

Tags: , ,

We've got a rogue silent setup running as a startup service on multiple machines (XP/2000) in a Server 2003 domain environment.  The problem is, it stalls and then causes critical services to fail on the PC.  The work-around is to set this service to manual or disabled, and I'm trying to automate THAT process in our login script.  Normally, I think I could just do a reg /add but I'm having trouble with syntax AND the service is named slightly differently on all PCs.

The service name generally has spaces in it, so I'm not sure, syntax-wise how to tackle that.

I know I'm generally looking for
reg /add HKLM\SYSTEM\CurrentControlSet\Services\(Service Name)...

Next, the problem is there is a unique SID attached to the service for each machine... so I need to create a login script that will
1) Search HKLM\SYSTEM\CurrentControlSet\Services\   and search for "KL Wrapper" which will be on all of the machines
2) Extract the EXACT service name from step 1 (including the unique identifier)
3) Use #2 (in correct syntax) to change the START value from 2 (automatic) to 3 (manual).

Can this be done?  I think I just need help with the syntax.Start Free Trial
[+][-]08.13.2008 at 02:21PM PDT, ID: 22225742

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.13.2008 at 05:34PM PDT, ID: 22226980

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.13.2008 at 06:38PM PDT, ID: 22227298

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.21.2008 at 05:08AM PDT, ID: 22278404

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.21.2008 at 05:37AM PDT, ID: 22278671

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_2_20070628