Jump to content

Use restore points under Server2003


Recommended Posts

AutoIt will often be used to install apps unattended.

For some reasons system restore is very useful.

Server 2003 hasnt this feature installed.

The interface is grayed out.

If u want to use it under Server 2003, try:


;check os
If @OSVersion <> "WIN_2003" then exit

;normal .inf installation
Runwait ("rundll32.exe advpack.dll,LaunchINFSection " & @ScriptDir & "\sr.inf ,DefaultInstall")

;add the service to the key
$reg = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost"
$net = RegRead ( $reg, "netsvcs")
$net = $net & @LF & "SRservice"

;and write it
RegWrite( $reg, "netsvcs", "REG_MULTI_SZ", $net)

;If u want to create a shortcut on desktop
;$sres = @SystemDir & "\restore"
;FileCreateShortcut ( $sres & "\rstrui.exe", @DesktopDir & "\Systemrestore.lnk" , $sres , "" , "" , $sres & "\rstrui.exe" , "" ,"0")

;reboot and let the service work
Shutdown ( 2 )

Store the compiled exe in a folder with the following files from an installed XP version.

Use F3 to find them.


If you leave following line in sr.inf alone, a restore point is created at every boot.

HKLM,"Software\Microsoft\Windows\CurrentVersion\Run","SRFirstRun",,"rundll32 srclient.dll,CreateFirstRunRp"

If you dont need this, change the line to RunOnce or delete it.

Now its installed and working properly under Windows Server 2003 :(

EDIT: Oops, i forgot: "from an installed XP version."

Edited by Westi
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...