Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Install Shield convert- Using NSIS for the first time (http://forums.winamp.com/showthread.php?t=231213)

cappy2112 17th November 2005 01:39

Install Shield convert- Using NSIS for the first time
 
After taking example1.nsi and attempting to make it work for my target application, NSIS prompted me with the Install Dir path that I had entered into the InstallDir variable.

I don't want the user to be able to change the path, only the drive to which the application is installed.

1. Where can I find an example to prevent NSIS from prompting
the user to change the installation path?
2. Where can I find an example that lets the use change the target destination drive ONLY?

I didn't see anything that would do what I need in the examples directory

thanks

Afrow UK 17th November 2005 08:46

As far as I know this hasn't been asked before, however it shouldn't be too hard.
If you're using Modern UI you just don't need the !insertmacro MUI_PAGE_DIRECTORY in your code.

As for selecting a drive to install to, your best bet is to make an InstallOptions dialog. See InstallOptions examples in Examples\InstallOptions, Examples\Modern UI\InstallOptions.nsi and the readme under Docs\InstallOptions.

There should be some functions or a plugin on the Wiki to get a list of hard drives on the computer.
Check http://nsis.sourceforge.net/Developer_Center

-Stu

cappy2112 17th November 2005 16:47

Quote:

Originally posted by Afrow UK
As far as I know this hasn't been asked before, however it shouldn't be too hard.
If you're using Modern UI you just don't need the !insertmacro MUI_PAGE_DIRECTORY in your code.

-Stu

Thanks for replying

>>If you're using Modern UI you just don't need the >>!insertmacro MUI_PAGE_DIRECTORY in your code.
I'm not doing this at all. I'm merely used the example1.nsi in the examples directory, and set

INSTALLDIR = "C:\MyPath"

and I was prompted with a dialogue box to browse to e new path or type it in by hand.

dandaman32 17th November 2005 23:28

Use the NSIS page command.

PHP Code:

Page license
Page components
Page Instfiles 

Normally there would be a "Page directory" in between components and instfiles, but you can leave it out to omit the directory page.

Will try to write an InstallOptions page in the next few minutes here...

-dandaman32

cappy2112 17th November 2005 23:35

Quote:

Originally posted by dandaman32
Use the NSIS page command.

PHP Code:

Page license
Page components
Page Instfiles 

Normally there would be a "Page directory" in between components and instfiles, but you can leave it out to omit the directory page.

Will try to write an InstallOptions page in the next few minutes here...

-dandaman32

I see. I 've removed the Page Directory, not it doesn't prompt the user.

This program is really a bear to figure out.
I'm starting to think that Install Shield is a better way to go.

dandaman32 17th November 2005 23:47

1 Attachment(s)
Done

-dandaman32


All times are GMT. The time now is 05:45.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.