Q)How handle URL in .msi (Application pakaging)
Ex: if i have some url www.google.com how i include in .msi
if i launch a shortcut it will directly open www.google.com
Answers (2)
If you are using a raw MSI editor like Orca or InstEd you can do this with the IniFile-table.
Here is described how it works: https://www.flexerasoftware.com/blog/software-installation/2016/06/how-to-create-an-internet-shortcut-with-installshield/
I made an example and added a desktop shortcut to the MSI of CDBurnerXP. You can achieve this directly in the MSI or create/edit an MST.
If you prefer a more comfortable way you may want to take a look at Advanced Installer to create MSIs like that. It's free for basic features.
Here is my example Google-shortcut:
The values explained:
IniFile | Needs to be some unique value for each row. You can make one up. |
FileName | This is what your Link's name will be. So my shortcut here will be named "Google". |
DirProperty | Where you want to place the shortcut. Refer to the directory table of your MSI. "DesktopFolder" will be the All-Users-Desktop. |
Section | This needs to be "InternetShortcut" for our purposes. |
Key | This needs to be "URL" for our purposes. |
Value | Enter the desired target URL here. |
Action | No action needed, so set it to "0". |
Component | This is important: you need to bind your shortcut to an existing component of your MSI setup (or create one, which is quite more difficult in a raw editor). If you want to force your shortcut, bind it to a component that is forced to local install. |
I would avoid tying a software installer to a shortcut if possible. You could simply use a Powershell script pushed from Kace to put a shortcut to your URL on all users' desktop.
This would do so:
If (-not (Test-Path $env:PUBLIC\Desktop\Google.lnk)) {
$TargetFile = "https://www.google.com"
$ShortcutFile = "$env:PUBLIC\Desktop\Google.lnk"
$WScriptShell = New-Object -ComObject WScript.Shell
$Shortcut = $WScriptShell.CreateShortcut($ShortcutFile)
$Shortcut.TargetPath = $TargetFile
$Shortcut.Save()
}