bitwise
28th March 2007 21:20 UTC
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!
Brummelchen
28th March 2007 21:39 UTC
no saver:
WriteRegStr HKCU "Control Panel\Desktop" "SCRNSAVE.EXE" ""
bitwise
28th March 2007 21:52 UTC
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!
Anders
28th March 2007 22:00 UTC
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
Brummelchen
28th March 2007 22:08 UTC
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.
bitwise
28th March 2007 22:13 UTC
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?
Brummelchen
29th March 2007 00:37 UTC
RTFM about processes how to kill that task... O_o
http://nsis.sourceforge.net/Processes_plug-in
anything else makes really no sense...
bitwise
29th March 2007 00:52 UTC
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!