Old 2nd March 2006, 00:13   #1
jtbjustin
Junior Member
 
Join Date: Mar 2006
Posts: 2
Using a path from a user in the install directory

Hello,
Im trying to make a install file using the Modern User Interface. What im trying to do is make a installer to update some files that are already on a computer. What I would like to be able to do is get the directory of the installed files from the user, store that in a variable and then in my script add more to that path, and then finally install into that directory. Now I know what I just said made pretty much no sense so let me give an example, say you have previously installed my program, lets call it TestP, and this program is installed in C:\Program Files\TestP on your computer but the directory that I want to install the new files is actually C:\Program Files\TestP\NewFiles what I want to do is ask the user where the root directory for TestP is on their computer (Ex. C:\Program Files\TestP) but then actually install my new files into C:\Program Files\TestP\NewFiles
Im not trying to find the parent directory of C:\Program Files\TestP\NewFiles (like the script listed in Appendix C although it may be a start in the right direction, im not sure), im trying to have the user tell me where C:\Program Files\TestP is located on their computer because when the user originally installed TestP they may have installed it in a different location than the default.
What I have been trying to do is re-dfine the variable that is assigned on the directory page to install.
EX.
!define MUI_DIRECTORYPAGE_VARIABLE $NewV
!insertmacro MUI_PAGE_DIRECTORY

I just do not know what to do next. And also with my current script making this change results in a compile error, I have attached an example of my script.

Any help is greatly appreciated.

-Justin B.
Attached Files
File Type: nsi setup.nsi (1.2 KB, 332 views)

Last edited by jtbjustin; 2nd March 2006 at 00:45.
jtbjustin is offline   Reply With Quote
Old 2nd March 2006, 01:35   #2
dienjd
Senior Member
 
Join Date: Oct 2005
Posts: 189
Is there any way you can detect the previously installed location (through the registry maybe)? This would be a better user experience than having users manually enter this, and there's always the chance of them entering an incorrect path.
dienjd is offline   Reply With Quote
Old 2nd March 2006, 21:56   #3
jtbjustin
Junior Member
 
Join Date: Mar 2006
Posts: 2
good point.

I have solved my problem, thank you for your help!
jtbjustin is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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