View Full Version : 2 SetOutPath?
17th September 2004, 04:20
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!
17th September 2004, 04:23
Sorry I forgot to attach my script. Here it is.
17th September 2004, 07:28
I am not sure I well understand your problem, but maybe you can do it like that.
CreateShortCut "$DESKTOP\SMSCenter.lnk" "$INSTDIR\bin\startup.bat"
17th September 2004, 07:44
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 :).
17th September 2004, 09:33
Ok, now it's clear, what is going on :)
... $OUTDIR is used for the working directory. You can change it by using SetOutPath before creating the Shortcut. ...
so maybe it will works
SetOutPath "x:\blabla\bin" ; directory needed for shortcut working dir
SetOutPath "c:\projects" ; original Install directory
17th September 2004, 10:53
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.
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.