/build/static/layout/Breadcrumb_cap_w.png

Placing Shortcuts with .MSI Package

I've been asked to package several diagnostic scripts into a .msi package. As part of this, I've also been asked to provide shortcuts to the scripts via the .msi package.

I use Visual Studio 2008 to create my .msi files. I don't have a problem getting the desktop shortcut to the right place (this is a default field in the System Editor within VS 2008). I need to get 3 other shortcuts into the All Users Start Menu\Custom Folder ("Custom Folder" is the name of the folder within the All Users Start Menu group). I can't figure out how to do this by default when creating the .msi package.

I have a VBScript to create the shortcuts in the correct place. Is there a way to incorporate this into the .msi file and then have the script execute upon installation?

0 Comments   [ + ] Show comments

Answers (11)

Posted by: ekniranjan 14 years ago
Purple Belt
0
Allenr1974,
So you need to add shortcut in .msi during creation of msi or what ?
Because you can add shortcut in msi.
Which tool use are using to creat .msi (Installshield or Wise ) ?
Posted by: Estes 14 years ago
Second Degree Blue Belt
0
I use Visual Studio 2008 to create my .msi files
Posted by: anonymous_9363 14 years ago
Red Belt
0
I use Visual Studio 2008 to create my .msi filesThat's your first problem. VS is OK for producing MSIs from VS projects but for anything out of the ordinary, it's pretty hopeless.

I'm assuming you're a developer: are you working for a software house? If so, you should encourage them to get serious about producing quality installation packages and spring for InstallShield AdminStudio. I wouldn't recommend Wise Package Studio (although I prefer that product to AS) because I have grave doubts about its future.

Anyway, your best bet in the meantime is to use Orca (part of the Platform SDK, which you must surely have, as a developer) or, better, InstEdit. Using these tools will mean you need to become familiar with the various MSI tables, in particular, the Shortcut table.
Posted by: allenr74 14 years ago
Yellow Belt
0
ORIGINAL: VBScab

I use Visual Studio 2008 to create my .msi filesThat's your first problem. VS is OK for producing MSIs from VS projects but for anything out of the ordinary, it's pretty hopeless.

I'm assuming you're a developer: are you working for a software house? If so, you should encourage them to get serious about producing quality installation packages and spring for InstallShield AdminStudio. I wouldn't recommend Wise Package Studio (although I prefer that product to AS) because I have grave doubts about its future.

Anyway, your best bet in the meantime is to use Orca (part of the Platform SDK, which you must surely have, as a developer) or, better, InstEdit. Using these tools will mean you need to become familiar with the various MSI tables, in particular, the Shortcut table.



Thanks for the tip. Actually, I am an SCCM Administrator. In my company, though, that role and the application packaging engineer is combined (I inherited both). I am a little familiar with Orca and I just discovered InstEdit.

Thankfully I discovered how to get the shortcuts into the All Users Start Menu. Unfortunately, though, I needed the shortcuts to launch powershell and then pass an argument to open powershell scripts. I wrote a VBScript that successfully does this and I will be able to combine that with my .msi in an SCCM distribution to get the desired result (shortcuts that work with powershell scripts). My ultmiate goal, however, is to keep it all self-contained in a .msi.

Is there anyway to package and then execute a vbscript (or any script/batch file) in a .msi file?
Posted by: anonymous_9363 14 years ago
Red Belt
0
Is there anyway to package and then execute a vbscript (or any script/batch file) in a .msi file?Yes. Perhaps the simplest route is to embed the script into the Binary table and use an appropriate Custom Action type which will cause it to be extracted and executed from there.

There should be no need for that, however. If the PowerShell script extension is properly set up to launch PS (something which the MSI can do for you, using the Extension table) then you should be able to create a simple shortcut which opens the script.
Posted by: allenr74 14 years ago
Yellow Belt
0
ORIGINAL: VBScab

Is there anyway to package and then execute a vbscript (or any script/batch file) in a .msi file?Yes. Perhaps the simplest route is to embed the script into the Binary table and use an appropriate Custom Action type which will cause it to be extracted and executed from there.

There should be no need for that, however. If the PowerShell script extension is properly set up to launch PS (something which the MSI can do for you, using the Extension table) then you should be able to create a simple shortcut which opens the script.



Interesting, VBScab. How do I set up that extension in the MSI? I took a shot at the icons using InstEd!. It was easy enough but the icons do not work. I think it has to do with the fact that I need to target powershell.exe with an argument to the ps location. I assume the extension you refer to would handle that?
Posted by: Rheuvel 14 years ago
Brown Belt
0
Icons can be added to the binary and/or icon table as well (not sure if it has to be in both). In the shortcut table you can point to that icon and you won't have to target an .exe to get a custom icon.
Posted by: kardock 14 years ago
Second Degree Green Belt
0
ORIGINAL: VBScab

I wouldn't recommend Wise Package Studio (although I prefer that product to AS) because I have grave doubts about its future.


VBScab, could you please elaborate on this? since you're the guru around here, i'm very curious why you say this.

thanks!
Posted by: allenr74 14 years ago
Yellow Belt
0
ORIGINAL: Rheuvel

Icons can be added to the binary and/or icon table as well (not sure if it has to be in both). In the shortcut table you can point to that icon and you won't have to target an .exe to get a custom icon.


Thank you, Rheuvel. The issue is not with the icons but with the target + the arguments. Essentially, I have to target powershell.exe and then add an argument in the path to open the .ps1 file that is deployed with the .msi. My vbscript can create the shortcuts without issue but I am having difficulty putting them in a .msi and having them work.

I tried putting the script in the .msi and activating it with a Custom Action. I get an error, though. I have to activate .msi logging and see what the error is.
Posted by: anonymous_9363 14 years ago
Red Belt
0
you're the guru around hereHardly...

As to WPS's future, it's my understanding that there is - to all intents and purposes - no development team left at Symantec which is dedicated to the Wise product line. There were clues about that situation by the amount of time the various v7 service packs and things like support for Vista took to arrive. For me, the straw that broke the camel's back was v8 which, we all know, should really have been called v7 SP4. To dress it up as a major version upgrade was a disgrace. While we were whining on Symantec Connect's WPS forum last year, the Product Manager made all the right noises about their committment to Wise but it had the whiff of a politician's weasle words about it.
Posted by: kardock 14 years ago
Second Degree Green Belt
0
ORIGINAL: VBScab

you're the guru around hereHardly...



you're too humble!
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ