Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 20th October 2002, 00:57   #1
stepan
Junior Member
 
Join Date: Oct 2002
Posts: 3
.scr to .exe question

Hello,

After doing a few unsuccesful searches I've finally run into this forum. I'm trying to make an installer file for my screensaver (.scr)
I got as far as having the file copied into 'windows' directory from the .exe - however, this is where I got stuck.

Normally to install the screensaver, one would have to rightclick on the .scr file, select 'install', which would call up the 'display properties / screensavers' and set the screensaver as 'default screensaver' automatically.

How can I get this working with NSIS installer?

Any tips/suggestions would be much appreciated.
Thank you,

Stepan
stepan is offline   Reply With Quote
Old 20th October 2002, 05:23   #2
Dick4
Member
 
Join Date: Mar 2002
Location: Mass
Posts: 85
I believe you'll need to edit the registry...changing HKCU\Control Panel\Desktop and modifying the "SCRNSAVE.EXE" string value to be the full path to your .scr file.

Similar article from MS here:

http://support.microsoft.com/default...;Q185348#Task1
Dick4 is offline   Reply With Quote
Old 20th October 2002, 14:51   #3
stepan
Junior Member
 
Join Date: Oct 2002
Posts: 3
Thanks for the tip but this seems to be for W2000 only and considered I'll want this to work for 98up at least I think I'll have to find out what the 'display options/screensaver' do or the .scr / install.


anyone else?

step
stepan is offline   Reply With Quote
Old 20th October 2002, 17:06   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
Taken from HKCR\scrfile\shell\install\command:
rundll32.exe desk.cpl,InstallScreenSaver %l

Using ExecWait 'rundll32.exe desk.cpl,InstallScreenSaver "C:\whatever\myscreensaver.scr"' should produce the same results as right clicking on the .scr file and choosing install.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 21st October 2002, 00:32   #5
Dick4
Member
 
Join Date: Mar 2002
Location: Mass
Posts: 85
heh, good thinking Kichik...
Dick4 is offline   Reply With Quote
Old 12th November 2002, 00:59   #6
stepan
Junior Member
 
Join Date: Oct 2002
Posts: 3
Thanks a lot - that did the job...
stepan is offline   Reply With Quote
Old 12th October 2003, 13:50   #7
nickjohnston
Junior Member
 
Join Date: Oct 2003
Posts: 7
Still requires user input on Win98

Quote:
Originally posted by kichik
Taken from HKCR\scrfile\shell\install\command:
rundll32.exe desk.cpl,InstallScreenSaver %l

Using ExecWait 'rundll32.exe desk.cpl,InstallScreenSaver "C:\whatever\myscreensaver.scr"' should produce the same results as right clicking on the .scr file and choosing install.
I'm trying to do the same as the original poster, and just running

rundll32 desk.cpl,InstallScreenSaver "c:\windows\blonde~1.scr"

from a DOS box actually brings up the screensaver dialog with the desired screensaver selected, but the user still has to click OK.

Is there any way of removing this behaviour?

Thanks,

Nick
nickjohnston is offline   Reply With Quote
Old 12th October 2003, 14:38   #8
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
Not that I know of.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 12th October 2003, 17:38   #9
nickjohnston
Junior Member
 
Join Date: Oct 2003
Posts: 7
Quote:
Originally posted by kichik
Not that I know of.
Well, I just had a bit of a thought about this, not sure if it's possbile from NSIS though - could I 'locate' that window by its title (will be different in different versions of the OS though possibly) and then use 'SendKeys' or similar to send keystrokes to the window e.g. ESC?

Thanks,

Nick
nickjohnston is offline   Reply With Quote
Old 12th October 2003, 18:21   #10
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
Should be possible using the System plug-in. However, window finding will be difficult with localized Windows versions.
Joost Verburg is offline   Reply With Quote
Old 13th October 2003, 11:31   #11
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
It should be possible using FindWindow, GetDlgItem and SendMessage too, without System.dll. Though the best method would probably include a plug-in using hooks (something like DisableMB). You'd still have to find a unique way to identify the dialog but I think GetModuleFileName should be able to help there because the hook would be loaded into the process's memory.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump