Windows 7 Forums


Reply
Thread Tools

Control services behavior through .reg files

 
 
zzz
Guest
Posts: n/a
Thanked:
 
      12-15-2011
Hi,

with windows xp i used to have my .reg file to control the startup type of the
services, so that i didn't had to manually do it every time i had to reinstall.
Now with Windows 7 it looks like it's no longer possible to do that since they
keep having the same startup type even though the settings in the reg file
should disable them. My reg file looks like this:


Windows Registry Editor Version 5.00


[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\WSearch]
"Start"=dword=00000004

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\TrkWks]
"Start"=dword=00000004

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\FontCache3.0.0.0]
"Start"=dword=00000004

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\WMPNetworkSvc]
"Start"=dword=00000004


Should i just use the sc command or is there a way to use the reg files?
 
Reply With Quote
 
 
 
 
Seth
Guest
Posts: n/a
Thanked:
 
      12-15-2011

"zzz" <> wrote in message news...
> Hi,
>
> with windows xp i used to have my .reg file to control the startup type of
> the
> services, so that i didn't had to manually do it every time i had to
> reinstall.
> Now with Windows 7 it looks like it's no longer possible to do that since
> they
> keep having the same startup type even though the settings in the reg file
> should disable them. My reg file looks like this:
>

< snipped for brevity >
>
> Should i just use the sc command or is there a way to use the reg files?


Depends on how you are launching the .REG file (UAC constraints and all).

My pick would be to do the work via a CMD file calling SC or make the move
to PowerShell.


 
Reply With Quote
 
zzz
Guest
Posts: n/a
Thanked:
 
      12-15-2011
Thanks for the answer.
I can see the uac prompt and i choose yes but it still doesn't work... how do i
do that with powershell?


"Seth" <> wrote:
>"zzz" <> wrote in message news...
>> Hi,
>>
>> with windows xp i used to have my .reg file to control the startup type of
>> the
>> services, so that i didn't had to manually do it every time i had to
>> reinstall.
>> Now with Windows 7 it looks like it's no longer possible to do that since
>> they
>> keep having the same startup type even though the settings in the reg file
>> should disable them. My reg file looks like this:
>>

>< snipped for brevity >
>>
>> Should i just use the sc command or is there a way to use the reg files?

>
>Depends on how you are launching the .REG file (UAC constraints and all).
>
>My pick would be to do the work via a CMD file calling SC or make the move
>to PowerShell.


 
Reply With Quote
 
Seth
Guest
Posts: n/a
Thanked:
 
      12-15-2011

"zzz" <> wrote in message news...
>

< fixed top-posting >
>
> "Seth" <> wrote:
>>"zzz" <> wrote in message
>>news...
>>> Hi,
>>>
>>> with windows xp i used to have my .reg file to control the startup type
>>> of
>>> the
>>> services, so that i didn't had to manually do it every time i had to
>>> reinstall.
>>> Now with Windows 7 it looks like it's no longer possible to do that
>>> since
>>> they
>>> keep having the same startup type even though the settings in the reg
>>> file
>>> should disable them. My reg file looks like this:
>>>

>>< snipped for brevity >
>>>
>>> Should i just use the sc command or is there a way to use the reg files?

>>
>>Depends on how you are launching the .REG file (UAC constraints and all).
>>
>>My pick would be to do the work via a CMD file calling SC or make the move
>>to PowerShell.

>
> Thanks for the answer.
> I can see the uac prompt and i choose yes but it still doesn't work... how
> do i
> do that with powershell?


Well if you insist on doing it via direct registry edits an example of that
code in a PS1 file would be (this particular code is for changing the
networking mode on a Med-V guest)...

$RegKey ="HKLM:\SOFTWARE\Microsoft\Medv\v2\VM"
Set-ItemProperty -path $RegKey -name NetworkingMode -value BRIDGED

For doing the equivalent of the SC process... (see
http://technet.microsoft.com/en-us/l.../ee176963.aspx)

Set-Service spooler -startuptype Automatic



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows 7 CMD Help & Tips Fire cat Customization 16 04-18-2012 05:17 PM
Frequent freezing - no bsod Sheerluck Crashes, BSODs and Debugging 3 04-13-2012 12:26 PM
Delayed Shut Down pmillen Windows 7 Support 0 12-29-2011 02:47 AM
Windows 7 Command Reference rakesh.kulkarni26 Windows 7 Support 2 03-25-2011 02:35 PM
Windows 7 for XP users - How to find your way around Nibiru2012 General Discussion 8 06-04-2010 03:23 PM


All times are GMT +1. The time now is 04:54 AM.
W7Forums is an independent website and is not affiliated with Microsoft Corporation.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33