Groups | Blog | Home
all groups > visual studio .net setup > april 2004 >

visual studio .net setup : Windows Installer problems


Lieperik
4/11/2004 9:36:02 AM
I got two problem using Windows Installer

1. Conditional Desktop Shortcu
When I create an installer package using Visual Studio .NET and use a checkbox dialog to ask whether the user wants to install a desktop shortcut to the application there is not way how I can add a condition to the shortcut which processes the information of the checkbox. It seems that if I add a shortcut to the desktop it will always be installed and it is not possible to add a condition to this

Question: Is there anybody who can tell me how to ask the user whether he/she wants to add a shortcut to the desktop during installation and how to process this so that it will be correctly added or not added

2. Environment String Valu
I am not able to find any information on using environment string value. What I want to do is to add a registry value to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run which contains the APPLICATION PATH\application.exe. I want that the application path is automatically added, dependent to the path the user has chosen in the INSTALLATION FOLDER dialog

Question: Can anyone tell me how to automatically add the APPLICATION PATH to the registry value during the installation depending on the folder the user has chosen

Many thanks!

Lieperi
Phil Wilson
4/11/2004 11:34:10 AM
On 2: Create a registry item and put [TARGETDIR]Application.exe in it -
TARGETDIR is the installer property that's evaluated at run time to the
actual folder (the brackets make that happen).

On 1: It's not a Windows Installer issue as much as the fact that VS is not
a fully-featured setup builder, which is why there are a bunch of other
products, some of which let you use all the features of MSI. In your
situation I'd use a VBScript custom action based on the CreateShortcut
method of the WshShell object, condition it on the property in your dialog.
--
Phil Wilson
[MVP Windows Installer]
[quoted text, click to view]
checkbox dialog to ask whether the user wants to install a desktop shortcut
to the application there is not way how I can add a condition to the
shortcut which processes the information of the checkbox. It seems that if I
add a shortcut to the desktop it will always be installed and it is not
possible to add a condition to this.
[quoted text, click to view]
he/she wants to add a shortcut to the desktop during installation and how to
process this so that it will be correctly added or not added?
[quoted text, click to view]
What I want to do is to add a registry value to the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run which
contains the APPLICATION PATH\application.exe. I want that the application
path is automatically added, dependent to the path the user has chosen in
the INSTALLATION FOLDER dialog.
[quoted text, click to view]
to the registry value during the installation depending on the folder the
user has chosen.
[quoted text, click to view]

Lieperik
4/11/2004 6:46:02 PM
Many thanks Phil. Item two works now and we ware working on the custom script for the shortcut

AddThis Social Bookmark Button