enlil
14th March 2004 03:51 UTC
Start In? when createshortcut
Hey all,
I'm trying to create an installation that points to a custom browser. I can create the shortcut no problem, and I can get it to be placed on the desktop. The problem is that it doesn't have a "Start In" that is the same as the "Target". Normally I don't think this is a problem, but since my 'browser' is calling local files, it must be started in the directory which it rests and not the desktop or a blank 'Start In' which is the case if the short cut is not moved/created on the desktop. Any thoughts on this? Unfortunately I can't just hard code the links or shortcut. The installation is meant to move around quite a bit.
Thanks in advance for any suggestions.
Cheers,
Kelly
enlil
14th March 2004 04:17 UTC
Okay.....I got it figured out. It's probably not the correct or most elegant way to make this work, but it does work. Here are the details in case anyone else needs to have a shortcut where the 'Start In' property is extremely important. Basically, the SetOutPath is what will be written to the "Start In" field. So, I did a couple searchpaths -- one for the actual file and one for the directory just above the installation. The shortcut gets created in the directory of the installation, and then I simply 'copyfiles'ed it to the desktop. Again, messy but it works. Hope this helps someone else. I've pasted example script below:
Section "Install Shortcut (mySC) for My Application (myApp)"
; Where am I?
SearchPath $whereami "myAPP.exe"
; Where am I?
SearchPath $whereami2 "../"
; Set output path to the installation directory.
SetOutPath "$whereami2\core"
; Create ShortCut
CreateShortCut mySC.lnk "$whereami"
; Rename
CopyFiles mySC.lnk $DESKTOP/mySC.lnk
SectionEnd
flizebogen
15th March 2004 15:14 UTC
Use the Command SetOutPath before CreateShortcut
mdlazreg
28th April 2004 02:45 UTC
You can do it better this way I think :
SetOutPath "YOUR_NEW_DIRECTORY"
CreateShortCut mySC.lnk "$whereami"
SetOutPath "YOUR_OLD_DIRECTORY"