- Visual Studio automatic
ally creates "advertised shortcuts". This shortcuts launch the Windows
Installer to check whether components are installed before cal
ling the shortcut.
- "Advertised shortcuts" will not work for
the SendTo folder.
- Advertised shortcuts an
d the SendTo folder
Solution:
Creating Non-advertised shortcu
ts. We
need to tell the windows installer to not disable advertised shortcuts.
This
will cause it to create regular shortcuts instead. We can do this
several w
ays.
- At the
command line
- When
running the setup executable pass a command li
ne option to disable advertised shortcuts.
"setup.exe
DISABLEADVTSHORTCUTS"
- Modify
the .MSI file created by the visual studio se
tup project
- Use
Microsoft's ORCA tool
- This is provided as p
art of the "Windows Installer SDK" which is part of the "Win
dows Platform SDK"
- After installing the Platform SDK you
actually have to install ORCA. Its setup file will
be in the directory where the Platform SDK was installed.
- Run ORCA and open the MSI file
- Select the table "Property"
- Add a row to the "Property" table
with the following values for the columns
- Property: DISABLEADVTSHORTCUTS
- Value: 1
- Create
a post build event of our setup project to automatically insert and set
the property DISABLEADVTSHORTCUTS in our MSI file
- Microsoft provides the script
"WiRunSQL.vbs" with the windows installer SDK
- This script allows yo
u to programmatically modify the MSI file
- Create
a post build event for your SetupProject
- Thi
s is different then for regular projects
- Highlight
your project in solution explorer
- Select its properties - this
will bring up the property window

- Click on
".." and enter the following com
mand to run the script which will automatically insert and set DISABLEADVTSHORTCUTS
in the msi file
cscrit
//nologo "..\WiRunSql.vbs" "$(BuiltOuputPath)" "IN
SERT
INTO Property(Property, Value) VALUES ('DISABLEADVTSHORTCUTS', '1')"
- You will
need to adjust the path to WiRunSql.vbs
- My suggestion is to add
WiRunSql.vbs to your SetupProject folder (i.e the folder containing the
Debug and Release folders)
- The working directory
for the post build event is the "Debug" or "Release" folder
- So using "..\WiRunSql.vbs" points to
the directory above it.