|
|
#1 |
|
Junior Member
Join Date: Mar 2012
Posts: 5
|
Ask for sourcepath.
Hello,
I'm trying to make a script which copy some file from a random location to the folder choosen by the user. For the moment I use $exedir as source, but this solution only works if the exe setup is in the folder of the file I want to copy. I don't find how to ask the user to set the "sourcepath". thanks |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
Simply insert a second directory page. You can customize the directory page by defining MUI_DIRECTORYPAGE_TEXT_TOP etc just before you !insertmacro mui_page_directory. See MUI readme: http://nsis.sourceforge.net/Docs/Mod...02/Readme.html
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Mar 2012
Posts: 5
|
Thanks
|
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Mar 2012
Posts: 5
|
Is there a way to force a directory page to accept no writable path like a dvd-rom drive ?
Actually I can't the next button is hiden. |
|
|
|
|
|
#5 | |
|
Forum King
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
|
Quote:
|
|
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Mar 2012
Posts: 5
|
"A function to avoid users installing software on read-only places."
That not what I'm looking for. I use 2 directory page (!insertmacro MUI_PAGE_DIRECTORY) One for to let the user select the source of files to copy (DVD-Rom MEDIA) One for the installation path. If i select a dvd-rom drive on the first directory page, i can't continue. |
|
|
|
|
|
#7 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
You can use the dirverify function to implement your own directory verification, but then the next button will never be grayed (you need to throw your own error). I guess this is an installer-wide attribute, so you would need to set a variable in the DVD-directory page prefunction so that you know which page you're leaving from.
http://nsis.sourceforge.net/Docs/Chapter4.html#4.8.1.16 But you can also just make your own custom page asking for the DVD path, using nsDialogs. http://nsis.sourceforge.net/Docs/nsDialogs/Readme.html Also, you could create an autodetect script that searches all drives for a specific DVD label or specific DVD files, and skip the page if the DVD is already in the drive. See also http://nsis.sourceforge.net/DVD_functions |
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Mar 2012
Posts: 5
|
I finally use this kind of code with GetDrives
http://forums.winamp.com/showthread.php?t=316729 Thanks |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|