Hello,
I need to realize a special shortcut for my application. It should be like:
KEY\bin\gwx.exe myfile -runtime
...where KEY is the path of a program (already installed) that is written in a key of the registry.
I tried to read this key creating a record in the RegLocator table, but now I can't understand how to format the string for that shortcut...
Any help would be appreciated.
Thank you very much
Misirion
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Dynamic shortcuts?
Started by
misirion
, Mar 19 2003 23:58
5 replies to this topic
Posted 25 March 2003 - 19:28
Hi there,
Even if you so a search and get the Reg key in a property, the shortcut table wont allow you to enter a property.
So, you could go for a CA which will create a .lnk file as desired. Since the target is read from a reg key, I suppose you arent installing it.So your shortcut will be non advertised.
Add the CA after the CreateShortcuts Sequence. I hope this helps !
Even if you so a search and get the Reg key in a property, the shortcut table wont allow you to enter a property.
So, you could go for a CA which will create a .lnk file as desired. Since the target is read from a reg key, I suppose you arent installing it.So your shortcut will be non advertised.
Add the CA after the CreateShortcuts Sequence. I hope this helps !
Rajiv Madassery
Galway Scripting Center
Digital GlobalSoft Ltd.
(Subsidiary of Hewlett-Packard Company)
Galway Scripting Center
Digital GlobalSoft Ltd.
(Subsidiary of Hewlett-Packard Company)
Posted 26 March 2003 - 23:04
Quote |
Even if you so a search and get the Reg key in a property, the shortcut table wont allow you to enter a property |
The "Target" column (and others) accept formatted data, so I don't think this statement is correct...
Bye,
Dennis
---
Dennis Bareis (dbareis@No.Spam.gmail.com)
Free MSI update/creation tool (MAKEMSI):
http://users.cyberon...eis/makemsi.htm
Dennis Bareis (dbareis@No.Spam.gmail.com)
Free MSI update/creation tool (MAKEMSI):
http://users.cyberon...eis/makemsi.htm
Posted 27 March 2003 - 18:58
Use the Reglocator to get the path in a property eg. MYKEYPATH.
Then code an VBScript to create an lnk file with the property :
set WshShell = CreateObject("WScript.Shell")
DesktopFolder = WshShell.SpecialFolders("Desktop")
set FileShortcut = WshShell.CreateShortcut(DesktopFolder & "\My Shortcut.lnk")
FileShortcut.TargetPath = session.Property("MYKEYPATH")
FileShortcut.Description = "My Shortcut"
FileShortcut.WorkingDirectory = DesktopFolder
FileShortcut.Save
Does this help?
Then code an VBScript to create an lnk file with the property :
set WshShell = CreateObject("WScript.Shell")
DesktopFolder = WshShell.SpecialFolders("Desktop")
set FileShortcut = WshShell.CreateShortcut(DesktopFolder & "\My Shortcut.lnk")
FileShortcut.TargetPath = session.Property("MYKEYPATH")
FileShortcut.Description = "My Shortcut"
FileShortcut.WorkingDirectory = DesktopFolder
FileShortcut.Save
Does this help?
Rajiv Madassery
Galway Scripting Center
Digital GlobalSoft Ltd.
(Subsidiary of Hewlett-Packard Company)
Galway Scripting Center
Digital GlobalSoft Ltd.
(Subsidiary of Hewlett-Packard Company)
Posted 27 March 2003 - 21:55
Thank you very much, that was great!
At this point... do you know how to let a script start during the unistallation phase, to remove the shortcuts that I entered before?
Thanks again!
At this point... do you know how to let a script start during the unistallation phase, to remove the shortcuts that I entered before?
Thanks again!
Posted 28 March 2003 - 19:23
Thats simple !!!
Dim fso, f1, path
Set fso = CreateObject("Scripting.FileSystemObject")
path = session.Property("DesktopFolder")
Set f1 = fso.GetFile(path & "My Shortcut.lnk")
f1.Delete
Call this CA with condition REMOVE~="ALL"
Dim fso, f1, path
Set fso = CreateObject("Scripting.FileSystemObject")
path = session.Property("DesktopFolder")
Set f1 = fso.GetFile(path & "My Shortcut.lnk")
f1.Delete
Call this CA with condition REMOVE~="ALL"
Rajiv Madassery
Galway Scripting Center
Digital GlobalSoft Ltd.
(Subsidiary of Hewlett-Packard Company)
Galway Scripting Center
Digital GlobalSoft Ltd.
(Subsidiary of Hewlett-Packard Company)