Setting a custom working directory for a shortcut


Article ID: 180393


Updated On:


Symantec Products




How do I set a custom working directory for a shortcut in a Windows Installer installation (.MSI)?


To set the working directory of a shortcut in your installation to a custom location, perform the following steps:

1. From  Installation Expert > Files page, select Destination Computer in the lower-left pane and click the New Folder button.
2. Type in a directory name (for example, "DummyDirectory").
3. From Installation Expert > Shortcuts page, double-click on the shortcut you want to modify.
4. Click on the Working Directory drop-down; select the directory created in Step 2 and click OK.
5. From MSI Script > Execute Immediate tab, insert a Set Directory custom action above the CreateShortcuts action.
6. Input a name for your custom action (for example, "Set_DummyDirectory").
7. Click Browse; select the directory created in Step 2, and click OK. Note the directory identifier (for example, "INSTALLDIR1") for this directory for use in step 10.
8. In the Directory Value field, input the full path to the custom location (for example, "M:\CD Images") for the working directory and click OK.
9. From Setup Editor> Tables tab Select the CreateFolder table.
10. Right-click on the row that refers to the directory identifier from step 7, and select Delete Row(s).