Article ID: 242586 - Last Review: January 19, 2001 - Revision: 1.0

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

This article was previously published under Q242586
Expand all | Collapse all

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  (http://support.microsoft.com/kb/255905/EN-US/ ) HOWTO: Use the Orca Database Editor to Edit Windows Installer Files
Use this workaround to resolve the problem:
  1. Start Orca from the Orca shortcut on the Programs menu.
  2. 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.
  3. 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.
  4. 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
  5. 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.
  6. From the File menu, select Save, and then close Orca.
  7. 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.
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.

STATUS

This behavior is by design.

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).

REFERENCES

For information about Orca, tables, and properties, see the Windows Installer help file (Msi.chm) in the Windows Installer SDK. This is available from the following Web site:
http://msdn.microsoft.com/developer/sdk/wininst.asp (http://msdn.microsoft.com/developer/sdk/wininst.asp)

APPLIES TO
  • Microsoft Visual Studio Installer 1.0
Keywords: 
kbprb KB242586
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
 

Article Translations