Archive: How to uninstall screensaver?


How to uninstall screensaver?
I'm trying to figure out how to uninstall the screensaver if the end user happens to leave their screensaver settings and dialog box open to the saver they want to uninstall.

(It happens more than you'd think!)

I tried setting the saver to blank before uninstalling the actual .scr file, but that didn't work.

Section Uninstall
WriteRegStr HKCU "Control Panel\Desktop" "ScreenSaveActive" "0"
Delete "$WinDir\MyScreenSaver.scr"

Suggestions anyone? Maybe a way to close that window, then set the default saver to blank, then remove the saver they want uninstalled?

How do you close dialog window, though?

Thanks!


no saver:

WriteRegStr HKCU "Control Panel\Desktop" "SCRNSAVE.EXE" ""


Thanks for that! They both seem to set the default saver to blank, but only if the Display Settings window is closed to begin with. If it's open, it won't delete the saver.scr file.

Is there a way to close the Display Settings window before it tries to delete the .scr file?

Thanks!


Your screensaver could create a mutex and you could check for that during uninstall and tell the user to close the Display Settings window to continue


calling the display settings:

execwait "rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,1"

from http://www.google.com/search?q=rundll+control+panel

but why exit that panel if the uninstaller is running???
the uninstaller is called from the software list and can do without that panel. seems useless that idea.


I want to close the Display Settings dialog window because if it's open to the settings of the saver they're trying to uninstall, it won't remove the .scr file.

So I'd love to close that window before attempting to remove the .scr file.

Make sense?


RTFM about processes how to kill that task... O_o
http://nsis.sourceforge.net/Processes_plug-in

anything else makes really no sense...


Thanks Brummelchen!

Unfortunately, I'm a bit of a dunce when it comes to coding this.

Can anyone tell me how to kill that process?

Thanks!