cappy2112
17th November 2005 02:39 UTC
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 09:46 UTC
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 17:47 UTC
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
18th November 2005 00:28 UTC
Use the NSIS page command.
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
18th November 2005 00:35 UTC
Originally posted by dandaman32
Use the NSIS page command.
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
18th November 2005 00:47 UTC
Done
-dandaman32