MSFN Forum: disable System Restore during install? - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

disable System Restore during install? Rate Topic: -----

#1 User is offline   feochango 

  • Group: Members
  • Posts: 3
  • Joined: 08-February 05

  Posted 08 February 2005 - 04:22 PM

just wanted to find out if anyone has a way to disable system restore during install? I'd really like it to be during the install process and not a registry tweak or script to disable it one I'm done. I don't know if it can be done, but any suggestions are appreciated.

Thanks in advance!


#2 User is offline   chevin 

  • Group: Members
  • Posts: 5
  • Joined: 16-July 04

Posted 08 February 2005 - 05:52 PM

Not positive, but I think there is a way to turn it off in WINNT.SIF. Check the ref.chm in deploy.cab for that.

Also it can be turned off in the registry through cmdlines.txt, before any restore points are created.

#3 User is offline   kwpro 

  • Junior
  • Pip
  • Group: Members
  • Posts: 63
  • Joined: 27-October 04

Posted 08 February 2005 - 09:24 PM

You can use nlite to remove it completely.

#4 User is offline   durex 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 953
  • Joined: 21-October 04

Posted 08 February 2005 - 09:53 PM

^^ which is what I do....

#5 User is offline   Alanoll 

  • CODE tags people, CODE tags!
  • Group: Patrons
  • Posts: 5,496
  • Joined: 25-September 03

Posted 09 February 2005 - 12:01 AM

feochango, on Feb 8 2005, 04:22 PM, said:

just wanted to find out if anyone has a way to disable system restore during install?  I'd really like it to be during the install process and not a registry tweak or script to disable it one I'm done.  I don't know if it can be done, but any suggestions are appreciated.

Thanks in advance!

Option A - Import a registry tweak at CMDLINES.TXT with the tweak to disable the service (look in the registry tweak thread or BlackViper's site)

Option B - Once finding the registry entry, open up the hive***.inf files in your I386 directory and then change the proper entry to disable it from the start.

Problem with Option B, is that Setup might reset it during setup. Problem with Option A is that it might be active untill the end of setup (not sure on this one)

#6 User is offline   feochango 

  • Group: Members
  • Posts: 3
  • Joined: 08-February 05

Posted 09 February 2005 - 11:55 AM

kwpro, I've used nLite, but can't seem to find an option in there to disable it. Which category is it in? I've seen the % of space used option, but setting it to 0 didn't seem to work for me.

Alanoll, thanks, I think I'll give option B a try.

#7 User is offline   Alanoll 

  • CODE tags people, CODE tags!
  • Group: Patrons
  • Posts: 5,496
  • Joined: 25-September 03

Posted 09 February 2005 - 12:13 PM

feochango, on Feb 9 2005, 11:55 AM, said:

kwpro, I've used nLite, but can't seem to find an option in there to disable it.  Which category is it in?  I've seen the % of space used option, but setting it to 0 didn't seem to work for me.

Alanoll, thanks, I think I'll give option B a try.

in nLite its located under Services

#8 User is offline   feochango 

  • Group: Members
  • Posts: 3
  • Joined: 08-February 05

Posted 09 February 2005 - 12:59 PM

Got it! Not sure why I didn't see that before. :wacko:

#9 User is offline   Huli 

  • Group: Members
  • Posts: 4
  • Joined: 22-April 05

Posted 03 May 2005 - 08:35 AM

Does anyone know what nLite does to disable System Restore during the install? More specifically is it just deleting some files, modifying a file or two or is there something i can put into my Winnt'sif or unattend.txt to have System Restore disabled. I ran nLite to remove System Restore and it worked I'm just curious to see what it does. Thanks

#10 User is offline   InTheWayBoy 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 709
  • Joined: 16-August 04

Posted 03 May 2005 - 08:53 AM

I use this in my cmdlines.txt

; Disable System Restore Service
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\srservice]
"Start"=dword:00000004


Of course that is in a .reg file that is called from cmdlines.txt,

#11 User is offline   implodium 

  • Newbie
  • Group: Members
  • Posts: 23
  • Joined: 08-March 05

Posted 05 May 2005 - 07:57 AM

InTheWayBoy, on May 3 2005, 08:53 AM, said:

I use this in my cmdlines.txt

; Disable System Restore Service
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\srservice]
"Start"=dword:00000004


Of course that is in a .reg file that is called from cmdlines.txt,
<{POST_SNAPBACK}>



How about inserting a line in batch file called executed via cmdlines.txt ?

example inside batch file :

rem *** disable system restore ***
net stop srservice

-YOUR CUSTOM CODE GOES HERE -

rem *** finished with my custom stuff, turn restore back on ***
net start srservice


Note that i put my reg tweaks AFTER this sequence in separate batch file, so even
if the restore (or enything else) is started, reg tweaks (including service-tweaks)
will still be in effect.

#12 User is offline   tommy_vercetti 

  • Junior
  • Pip
  • Group: Members
  • Posts: 53
  • Joined: 01-October 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 05 May 2005 - 10:19 AM

Hi,

I was about to make the same post, just if any really knowledgeavle geek could tell me what I need to put in the WINNT.SIF that would disable system restore. I would be very grateful.

Thanks


P.S. I've tried nLite and believe it rocks just wanted to do this through WINNT.SIF

#13 User is offline   benners 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 692
  • Joined: 29-December 03

Posted 05 May 2005 - 10:29 AM

I have edited the sr.inf file.

In the i386 folder there should be a file sr.in_, I expanded this and deleted everything apart from
[version]
Signature="$CHICAGO$"
SetupClass=BASE
LayoutFile=layout.inf

[DefaultInstall]
Saved the file and placed it in the i386 folder and deleted the compressed sr.in_ file and it works for me, ugly maybe but it works.

This does not install the system restore and there is no tab available on the system properties page, so do not use this method if you at some time want to enable it.

#14 User is offline   implodium 

  • Newbie
  • Group: Members
  • Posts: 23
  • Joined: 08-March 05

Posted 06 May 2005 - 08:21 AM

benners, on May 5 2005, 10:29 AM, said:

I have edited the sr.inf file.

In the i386 folder there should be a file sr.in_, I expanded this and deleted everything apart from
[version]
Signature="$CHICAGO$"
SetupClass=BASE
LayoutFile=layout.inf

[DefaultInstall]
Saved the file and placed it in the i386 folder and deleted the compressed sr.in_  file and it works for me, ugly maybe but it works.

This does not install the system restore and there is no tab available on the system properties page, so do not use this method if you at some time want to enable it.
<{POST_SNAPBACK}>


Ummm... Interesting approach ! There's lot of stuff you could throw out this way.
Major boot disk cleanup ! Maybe nLite works like this when removing components ?
I wonder ...

#15 User is offline   rockstarjeremy 

  • Group: Members
  • Posts: 1
  • Joined: 10-August 04

Posted 30 September 2005 - 03:17 PM

1. COPY THIS INTO NOTEPAD:

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\default")

Set objItem = objWMIService.Get("SystemRestore")
errResults = objItem.Disable("")


2. SAVE FILE AS... "SROff.vbs"

3. PUT SROff.vbs IN YOUR $OEM$ FOLDER

$OEM$\$1\Install\Scripts\


4. ADD THIS LINE TO winnt.sif:

[GuiRunOnce]
    "%systemdrive%\Install\Scripts\SROff.vbs"


======================
Disable Full System Restore
http://www.microsoft.com/technet/scriptcen...e/dmsrvb03.mspx

This post has been edited by rockstarjeremy: 30 September 2005 - 03:26 PM


#16 User is offline   implodium 

  • Newbie
  • Group: Members
  • Posts: 23
  • Joined: 08-March 05

Posted 30 September 2005 - 05:43 PM

@rockstarjeremy :

Thanks for that code ! I really like to solve stuff via vbs, i don't have to use any
3rd party application to automate stuff for me (yes i know about AutoIt and others,
i'm just trying to use all the native support i can get).

BTW: Do you know a good tutorial/faq about use of WMI under VBS ? There's
a lot of useful things that can be done (mainly reading system performance
counters) for various pieces of hardware. I've managed to rip vbs script that uses
WMI to access a wireless NIC (read-only) and have re-wrote it to work as
standalone script.

#17 User is offline   nmX.Memnoch 

  • MSFN Master
  • Group: Moderator
  • Posts: 2,086
  • Joined: 15-September 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 01 October 2005 - 06:08 PM

InTheWayBoy, on May 3 2005, 09:53 AM, said:

I use this in my cmdlines.txt

; Disable System Restore Service
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\srservice]
"Start"=dword:00000004


Of course that is in a .reg file that is called from cmdlines.txt,


Be sure to add the following command to your CMDLINES.TXT (either before or after the .reg file import...doesn't matter)

NET STOP "System Restore Service"


That will stop the service. Just disabling the service will leave it running until the next reboot or until it's been manually stopped either in the Services MMC or with the command above.

This post has been edited by nmX.Memnoch: 01 October 2005 - 06:08 PM


#18 User is offline   cyberyeye 

  • Member
  • PipPip
  • Group: Members
  • Posts: 141
  • Joined: 19-March 05
  • OS:XP Pro x86
  • Country: Country Flag

Posted 01 October 2005 - 08:42 PM

winnt.sif method works fine and really easy to do:

Quote

[SystemRestore]    DisableSR=1
    CreateFirstRunRp=0


And in my regfile (cmdlines.txt) I also add the regkey for stopping the SR service.

That's it at least for me.....

#19 User is offline   -.-PhanTom-.- 

  • Member
  • PipPip
  • Group: Members
  • Posts: 106
  • Joined: 13-October 05

Posted 17 October 2005 - 08:35 AM

Hmmm I added both the WINNT.INF entry and did the cmdlines.txt thing... but still sstem rstore is not disabled upon first boot....hmmmm

#20 User is offline   cyberyeye 

  • Member
  • PipPip
  • Group: Members
  • Posts: 141
  • Joined: 19-March 05
  • OS:XP Pro x86
  • Country: Country Flag

Posted 17 October 2005 - 09:09 AM

Ok here's my method....

CDXP
--$OEM$
----cmdlines.txt
----cmdlines.reg

---$OEM$
-----------$1
--------------install
--------------RunOnceEx.cmd

--I386
----winnt.sif

1. In cmdlines.reg i put ALL my tweak, including off course the "Stop System Restore Service":

Quote

; Desactivation of System Restore Service
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\srservice]"Start"=dword:00000004


2. In cmdlines.txt i put this line:

Quote

[COMMANDS]
"REGEDIT /S cmdlines.reg
"


3. In my RunOnceEx.cmd I import a second time my reg tweak:

Quote

REG ADD %KEY%\055 /VE /D "Configuration de Windows XP" /f
REG ADD %KEY%\055 /V 1 /D "regedit /s %cdrom%\SETUP\SOFT\Regtweak.reg" /f
Obviously this regtweak.reg contains also the strop SR tweak:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\srservice]
"Start"=dword:00000004

4. Into winnt.sif put these line:

Quote

[SystemRestore]
DisableSR=1
CreateFirstRunRp=0


Here' a little part of my winnt.sif for example:

Quote

[GuiUnattended]AdminPassword=
EncryptedAdminPassword=No
OEMSkipRegional=1
OEMSkipWelcome=1
TimeZone=105

[UserData]
Computername="PC-BUREAU"
Fullname="Proprietaire"
Orgname="/"
ProductKey=your serial num here.

[Display]
BitsPerPel=16
Xresolution=1024
YResolution=768
Vrefresh=75

[SystemRestore]
DisableSR=1
CreateFirstRunRp=0


[TapiLocation]
CountryCode=33
Dialing=Tone

[RegionalSettings]
InputLocale=040c:0000040c
LanguageGroup=1
Language=0000040c
UserLocale=0000040c

[Identification]
JoinWorkgroup=WORKGROUP

[Networking]
InstallDefaultComponents=Yes


that's it, and its works fine ^^

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy