add network shortcuts
Hi,
I want to include shortcuts to network apps in an MSI.
Is this possible? I use WinInstal LE2003.
Please help...
PatB
I want to include shortcuts to network apps in an MSI.
Is this possible? I use WinInstal LE2003.
Please help...
PatB
0 Comments
[ + ] Show comments
Answers (16)
Please log in to answer
Posted by:
cdupuis
20 years ago
Posted by:
PatB
20 years ago
Posted by:
kkaminsk
20 years ago
Well this is the way I do it so that it can be advertised if you are not installing binaries to the network drive. I create a shortcut to a local vbs file that will open the exe. Here is a sample script:
Set shell = CreateObject("WScript.Shell")
file = "R:\appy\app.exe"
args = "/f S:\data\f00.dat"
shell.Run Chr(34) & file & Chr(34) & " " & Chr(34) & args & Chr(34), 1, TRUE
Set shell = CreateObject("WScript.Shell")
file = "R:\appy\app.exe"
args = "/f S:\data\f00.dat"
shell.Run Chr(34) & file & Chr(34) & " " & Chr(34) & args & Chr(34), 1, TRUE
Posted by:
inert
20 years ago
Posted by:
plourenco
20 years ago
Posted by:
kkaminsk
20 years ago
Posted by:
Swipe
19 years ago
ORIGINAL: inert
That's right, make an .vbs:
Set WshShell=WScript.CreateObject("WScript.Shell")
cmd="\\NETWORKSHARE\PROGRAM.EXE"
WshShell.Run (cmd)
this only starts the executable
I would like to do something similar to this. I wish to replace a shortcut to a local file. The target is in c:\program files\app\app.exe but it has a "start in" to \\network share\folder
I tried the above code but this only works if the exe is located on the network share. I wish to know how to execute the exe in program files but start in at the network share. I have searched google high and low and can't find anything.
Posted by:
WiseUser
19 years ago
Posted by:
Swipe
19 years ago
Posted by:
Ipstenu
19 years ago
If they don't need to be advertised, you can do a LNK file (which is cheap, but it works).
The other thing we use here, if we have a local EXE but a network'd start in, is to make a custom action called SetNetworkDrive
Then in working directory, we put [NETWORKDRIVE] and poof, all is well.
The other thing we use here, if we have a local EXE but a network'd start in, is to make a custom action called SetNetworkDrive
'PATH MUST END WITH A BACK SLASH
'PATH MUST BE FULL PATH TO EXE WITHOUT THE EXE NAME
'SEQUENCE THIS CUSTOM ACTION AFTER InstallValidate and put condition REMOVE <> "ALL"
On Error Resume Next
Session.Property("NETWORKDRIVE") = "ENTER NETWORK LOCATION HERE"
Then in working directory, we put [NETWORKDRIVE] and poof, all is well.
Posted by:
WiseUser
19 years ago
You appear to be the victim of a limitation (or bug) in the Wise interface.
Although the Wise interface only lists "Directory" table entries in the drop down list for the working directory, the "Wkdir" column of the "Shortcut" table will accept a property too.
If you use a directory table entry, you will receive an error during installation if the network share is missing.
Instead, create use a public property and either hard code it's value in the property table, or specify a value on the command line. Beware that values specified on the command line will not be remembered for future repairs/reinstalls (you will need a custom action for this).
Btw Ipstenu... I don't know where you're from, but you should take care when using the word "poof" - it may not have the same meaning as it does in your country? I don't suppose you're French are you?[;)]
Although the Wise interface only lists "Directory" table entries in the drop down list for the working directory, the "Wkdir" column of the "Shortcut" table will accept a property too.
If you use a directory table entry, you will receive an error during installation if the network share is missing.
Instead, create use a public property and either hard code it's value in the property table, or specify a value on the command line. Beware that values specified on the command line will not be remembered for future repairs/reinstalls (you will need a custom action for this).
Btw Ipstenu... I don't know where you're from, but you should take care when using the word "poof" - it may not have the same meaning as it does in your country? I don't suppose you're French are you?[;)]
Posted by:
Swipe
19 years ago
Posted by:
Ipstenu
19 years ago
Instead, create use a public property and either hard code it's value in the property table, or specify a value on the command line. Beware that values specified on the command line will not be remembered for future repairs/reinstalls (you will need a custom action for this).
WiseUser, that's why we use a VBS in the custom action with the condition 'REMOVE <> "ALL"' :) It seems to cover us so far (we had a bad time when we used 'Not Installed' instead, and did a repair on an app and the shortcuts were screwed).
And yeah, I know from poof ;) Not a Francophile, but we have offices world wide and I seem to be the only MSI tech who knows from Brit and French Slang, so I get to have a blast on those support calls. I'm sure you know was meaning it as the good ol' American 'Wave my wand and *alakazam!* it works!'
Posted by:
BobTheBuilder
19 years ago
Just to chime in with another method.
Create a .lnk file to your network app and add it to your package as a file installed into a local program directory. Then you can create an advertised shortcut pointing to the link file that you install. If the computer is not attached to the network, clicking the shortcut to the link simply won't launch anything (you don't get the "Problem with shortcut" error). The limitation is that this only works on a Windows XP or above OS. Win2k dosen't like it. I have never tried it on Win9x or ME.
BTW sean_c_roberts mentioned the BDE merge module...that link won't do you any good as you have to have Delphi installed to even open the exe. Not exactly useful to a packager, that. Best bet is to run the BDE exectuable that comes with your app as a custom action.
Create a .lnk file to your network app and add it to your package as a file installed into a local program directory. Then you can create an advertised shortcut pointing to the link file that you install. If the computer is not attached to the network, clicking the shortcut to the link simply won't launch anything (you don't get the "Problem with shortcut" error). The limitation is that this only works on a Windows XP or above OS. Win2k dosen't like it. I have never tried it on Win9x or ME.
BTW sean_c_roberts mentioned the BDE merge module...that link won't do you any good as you have to have Delphi installed to even open the exe. Not exactly useful to a packager, that. Best bet is to run the BDE exectuable that comes with your app as a custom action.
Posted by:
sean_c_roberts
20 years ago
Aaargh!
You did a SNAPSHOT of the BDE?!
As a long-time Delphi developer, that scares the hell out of me!
PLEASE, go to the Borland web site and get the appropriate BDE merge module!
http://info.borland.com/devsupport/bde/bdeupdate.html
You will also need to learn how to use the little .exe Borland provides for setting up your aliases - you can use this in a custom action, I think.
A few more questions: does your network app connect to a database? Might users need to read or write data to the database simultaneously?
If so, then you ALSO need to think about your lock files (like PARADOX.NET) and how your installation will handle them.
For more information, look here: http://community.borland.com/article/0,1410,15212,00.html
As for your shortcut, just use your install tool's ability to create shortcuts, and list your application (I like UNC names) as the TARGET.
I hope this helps, and good luck.
- Sean Roberts
You did a SNAPSHOT of the BDE?!
As a long-time Delphi developer, that scares the hell out of me!
PLEASE, go to the Borland web site and get the appropriate BDE merge module!
http://info.borland.com/devsupport/bde/bdeupdate.html
You will also need to learn how to use the little .exe Borland provides for setting up your aliases - you can use this in a custom action, I think.
A few more questions: does your network app connect to a database? Might users need to read or write data to the database simultaneously?
If so, then you ALSO need to think about your lock files (like PARADOX.NET) and how your installation will handle them.
For more information, look here: http://community.borland.com/article/0,1410,15212,00.html
As for your shortcut, just use your install tool's ability to create shortcuts, and list your application (I like UNC names) as the TARGET.
I hope this helps, and good luck.
- Sean Roberts
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.