Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 17th September 2004, 04:20   #1
vun
Junior Member
 
Join Date: Jul 2004
Posts: 33
2 SetOutPath?

Hi I am having a problem with my desktop shortcut. I want my shortcut to run a batch file that is stored in the bin folder of my main application folder. I have set my $INSTDIR to be "C:\foldername" and this is also apparently the "Start In" of my shortcut. I want the "start in" to be something like "C:\foldername\bin". I was wondering if it is possible to have 2 SetOutPath to solve my problem. I have already tried it but the compiler says I did not reference my variable and I am wasting memory. For a better understanding of my problem, I have attaced my code below. I apologise if this is a repeated thread but I do not understand what the other threads mean. Thanks!
vun is offline   Reply With Quote
Old 17th September 2004, 04:23   #2
vun
Junior Member
 
Join Date: Jul 2004
Posts: 33
Sorry I forgot to attach my script. Here it is.
Attached Files
File Type: txt sip_installer.txt (14.8 KB, 88 views)
vun is offline   Reply With Quote
Old 17th September 2004, 07:28   #3
kobus
Junior Member
 
Join Date: Nov 2001
Location: Poland
Posts: 26
Hi,

I am not sure I well understand your problem, but maybe you can do it like that.
code:

CreateShortCut "$DESKTOP\SMSCenter.lnk" "$INSTDIR\bin\startup.bat"



kobus
kobus is offline   Reply With Quote
Old 17th September 2004, 07:44   #4
vun
Junior Member
 
Join Date: Jul 2004
Posts: 33
Hey kobus, thanks for your reply. I really appreciate it. However, I've already done what you asked me to do but each time i tried to run my application from the shortcut, the "Start In" would only have "C:\projects" which is my $INSTDIR. It dosent seem to read anything after my $INSTDIR.

Eg: CreateShortCut "$DESKTOP\SMSCenter.lnk" "$INSTDIR\SMSCenter\bin\startup.bat"

It will not register "SMSCenter\bin\". It only recognises $INSTDIR and only registers that as my "Start In". I need my Start In to be in the bin folder because that's where my batch file is located. I hope this is clearer now .
vun is offline   Reply With Quote
Old 17th September 2004, 09:33   #5
kobus
Junior Member
 
Join Date: Nov 2001
Location: Poland
Posts: 26
Ok, now it's clear, what is going on

Documentation says:
Quote:
4.9.3.4 CreateShortCut
... $OUTDIR is used for the working directory. You can change it by using SetOutPath before creating the Shortcut. ...
so maybe it will works
code:

SetOutPath "x:\blabla\bin" ; directory needed for shortcut working dir
CreateShortCut .....
SetOutPath "c:\projects" ; original Install directory


Kobus
kobus is offline   Reply With Quote
Old 17th September 2004, 10:53   #6
vun
Junior Member
 
Join Date: Jul 2004
Posts: 33
Hey kobus, thanks for the solution. My installer works fine now. I read that part of the documentation but I didnt really understand it. I really appreciate your quick responses and your help.

Thanks!!
vun 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