Microsoft KB Archive/242586

= PRB: You Cannot Change the "Start in:" Property of a Shortcut in Visual Studio Installer =

Article ID: 242586

Article Last Modified on 1/19/2001

-

APPLIES TO


 * Microsoft Visual Studio Installer 1.0

-



This article was previously published under Q242586



SYMPTOMS
The working directory of shortcuts created in Visual Studio Installer (VSI) cannot be set within the VSI development environment.



RESOLUTION
The installation package author can use Orca to set the working directory directly in the .msi file. Orca is a table editing tool that is available in the Windows Installer SDK. For additional information on obtaining and using Orca, click the article number below to view the article in the Microsoft Knowledge Base:

255905 HOWTO: Use the Orca Database Editor to Edit Windows Installer Files

Use this workaround to resolve the problem:  Start Orca from the Orca shortcut on the Programs menu. From the File menu, select Open and browse to your project's *.msi file. If you named your project "TestProject1", then TestProject1.msi is by default located in the ..\TestProject1\Output\Disk_1 folder. On the left side, the tables in the .msi file are listed. Scroll down and select the Shortcut table. The columns of the table are visible at the top of the right side. You can expand and collapse these columns. Find the shortcut entry for which you would like to set the working directory. Look for the name of your shortcut in the Name column. If you named your shortcut "Shortcut to test.exe" in VSI, then the entry in the column is (in the short|long format):

Sho~0001.exe|Shortcut to test.exe

 The working directory is set in the WkDir column of this table. You may have to scroll to the right to make this column visible. Double-click in the WkDir column of the selected shortcut. Type TARGETDIR, and then press ENTER. From the File menu, select Save, and then close Orca. To test the changes, either double-click the TestProject1.msi file in Windows Explorer or run the Setup.exe file created by VSI for this project.</li></ol>

When you build the Installer project within VSI, the .msi file is rewritten, and this removes the changes made in Orca. You must make these changes to the .msi file created by VSI after every build.

<div class="status_section">

STATUS
This behavior is by design.

<div class="moreinformation_section">

MORE INFORMATION
The value of the WkDir column is a property. If the working directory is not the folder where your program will be installed, then a property can be created and set in the Property table or on the command line. If you use the command line, you must use a public property (all capital letters).

<div class="references_section">