Archive: How to make MyApp that install with NSIS list in system restore point?


How to make MyApp that install with NSIS list in system restore point?
How to make MyApp that install with NSIS list in system restore point, like in Win ME or Win XP

I'm sorry about my English.


From my knowledge of WinME/XP, the system restore function is built in to the Windows Kernel and it just checks to see and restore to a better version. System Restore doesn't check programs and things. (I had an experience with this. When I was done, I was using NSIS v 1.1j ... When I was supposed to have NSIS Version 1.44. And I had no MS Word, so anything can happen).

-Duane


With System restore, windows simply reverts back to the state the system was in the last time a restore point was created, so you'd have to create a restore point just after installing your app. As for creating a restore point, I have no idea how - but I imagine if there was a way it would add a good 15 minutes onto the programs installation time. If that's going to happen - you'd be as well to use Microsoft's own installer. I imagine it would handle the system restore stuff a lot better and wouldn't miss anything out. Otherwise, you could simply show a messagebox asking whether the user would like to create a restore point, and if so run

%SystemRoot%\System32\restore\rstrui.exe

I believe this will be at a differant location for win me

First you'd obviously have to check that the OS the person is using supports system restore, and whether or not it is turned on (I always turn system restore off). You could use the OS detection script found in functions.htm for the first bit, and check the following reg key to see whether it is turned on or not

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore\DisableSR: 0x00000001

My advice would be don't bother though. If your application isn't so clunky that it might actually do damage to the operating system, then a simple uninstall should be good enough :)