Skip to content
⌘ NSIS Forum Archive

NSIS screensaver install

5 posts

Spaz007#

NSIS screensaver install

I'm building a screensaver for a project for my software engineering course and I want to put it in an installer. Here is the problem. After the installer copies everything over to the SYS32 dir it doesn't run correctly. It will run right only after I right click on the .SCR file and click on install. Then it runs great without any problems. Is there a way to make the NSIS installer call that install function?
magoo2002de#
Hello Spaz007!
I look at my Registry. So I think you have to call the rundll32.exe like:
rundll32.exe desk.cpl,InstallScreenSaver FullPathAndFilenameOfYourScreensaver
NOT TESTED!!!
goofee691#
ok i have recently made a install for a screensaver first what version of windows are u useing cuz you may want to use $sysdir rather than useing system32

secondly run the screensaver at the end of the installer im not sure if this is required but i did it so more settings could be made im not sure how i did it but i will post the script in maybe 3 days just have to find it
Takhir#
There are another modern tricks, but this works too (from Win95 to 2000 and XP)

SetOutPath $SYSDIR
File "${NAME_OF_YOUR}.scr"

; Set screensaver and make it active, DOS (short) name may require

WriteINIStr "$WINDIR\system.ini" "boot" "SCRNSAVE.EXE" "$SYSDIR\DOS_NAME_OF_YOUR.SCR"
System::Call 'user32.dll::SystemParametersInfo (17, 1, 0, 2)'