Fog Creek Software
Discussion Board




Temporarily disabling system restore

I am writing an application which displays the available screensavers, and lets the users delete them.

Unfortunately, because Windows XP has System Restore, if I delete, for example, "Bezier Curves Screensaver", Windows XP puts it back in a few minutes!

:-(

So, my app doesn't do it's job.

Is there a way to tell Windows to delete a file for good - ie. to no longer restore it?

Thank you!

Jake
Thursday, August 28, 2003

I'm not with you. System restore will only work if somebody deliberately uses it (as opposed to sysem file protection wihich will immediately overwrite the system file you have replaced with the original one).

So presumably you have an app that is designed to stop people running non-corporate screen savers because of some kind of control freakery, and you are thiinking of turning of system restore, which is designed to allow sysadmins and users to recover from serious problems easily. Mesees a certain lack of proportion here!

Stephen Jones
Thursday, August 28, 2003

I should make sure I have the original post in front of me before I comment - actually it's all Joel's fault for having such a defective interface :)

I hadn't noticed that you said the app allowed the user to delete screensavers. But what I don't understand is why you want to turn off system restore, if it will only restore the screensaver if the user asks it to.

Stephen Jones
Thursday, August 28, 2003

You can manage screen savers at the Domain/Active Directory level.  You can define that users of a particular group can't see the screen saver tab, that the screen saver is enabled and which screen saver to use and its parameters.

'Course that kind of negates the need for the application.

Simon Lucy
Thursday, August 28, 2003

What you're talking about is File Protection, not System Restore (unrelated features). You cannot turn off File Protection.

Brad Wilson (dotnetguy.techieswithcats.com)
Thursday, August 28, 2003

Ok, I understand and apologize.

It's not system restore I want to temporarily disable - it's system file protection!

:-(

Jake
Thursday, August 28, 2003

It is illogical not to be able to disable system file protection.

Microsoft HAS to do it in order to allow system updates (SP1 and SP2 for Windows XP, for example).

Jake
Thursday, August 28, 2003

From the Windows 2000 help file:
----By default, Windows File Protection is always enabled and only allows protected system files to be replaced when installing:

Windows 2000 Service Packs using Update.exe
Hotfix distributions using Hotfix.exe
Operating system upgrades using Winnt32.exe
Windows Update "

I, for one, am glad that MS doesn't allow any oddball developer to mess around with my system to bolster his ego.

Stephen Jones
Thursday, August 28, 2003

What are you realy trying to achieve? You can read up on how to do all this on starting on http://www.techspot.com/tweaks/wfp/index.shtml , but it is certainly not pretty (involves binary patching).
You should not do this.

Just me (Sir to you)
Thursday, August 28, 2003

Might I be so bold as to inject that the code you're talking about IS THE EXACT REASON Microsoft put File Protection into the OS in the first place. It was because of developers who felt they knew well enough to go on deleting and overwriting system files, and ending up trashing people's systems.

Brad Wilson (dotnetguy.techieswithcats.com)
Thursday, August 28, 2003

I concur with these guys.  My advice would be to disallow deleting system screensavers from your application with some sort of note for the user on why they can't delete them using your app and maybe some advice on how they could get rid of them if they'd like. 

SomeBody
Thursday, August 28, 2003

Yeah what would the point of having file protection be if any program could just shut it off?

This might suck for your app in specific, but in my experiece it keeps user's systems cleaner and more stable, so as a whole it is a big plus for Windows developers.

Mister Fancypants
Thursday, August 28, 2003

Also, and this is getting off topic, why write an app that lets users delete (the OS default) screensavers?  They take up negligible space and don't do anything unless activated.

Seems like a solution for a problem that isn't.

Mister Fancypants
Thursday, August 28, 2003

I have to disagree with the majority of posters, who seem to be missing the point. I can understand why you'd want to make it tough to delete files whose absence would keep Windows from running. But unless the operating system design is far different than I previously understood, removing any particular screen saver should not have that effect.

It would be nice if system file protection either didn't prevent changes to these "window-dressing" files, or had multiple levels of protection.

Saying "why would you want to delete a screen saver" is irrelevant -- the real question is, "why would you want to prevent someone from deleting a screen saver?"

zahid
Thursday, August 28, 2003

"Saying "why would you want to delete a screen saver" is irrelevant -- the real question is, "why would you want to prevent someone from deleting a screen saver?" "

Because it is far simpler to have a list of files that are unmodifyable than to have each file have some range of modifyability.  And simpler means less bug free, which means if there isn't a damn good reason for the more complex case, don't do it.  And there isn't a damn good reason.

Microsoft made the right choice here.

Mister Fancypants
Thursday, August 28, 2003

>> But unless the operating system design is far different than I previously understood, removing any particular screen saver should not have that effect. <<

For one thing, logon.scr is used on NT based systems for the logon screensaver.  There's a potential security issue with allowing it to be replaced.  I've heard claims that this has been exploited in the past, though I've never verified it for myself.

SomeBody
Thursday, August 28, 2003

*  Recent Topics

*  Fog Creek Home