When installing using MSI, set the working directory of the shortcut to the user home directory (#7072)

Leverage the -WorkingDirectory parameter on pwsh.exe to set the initial location.

Fix #5705
This commit is contained in:
Steve Lee 2018-06-19 18:33:01 -07:00 committed by Travis Plunk
parent abcdce4e3e
commit b25c1f6cbb

View file

@ -227,8 +227,8 @@
<Shortcut Id="PowerShell_ProgramsMenuShortcut"
Name="$(var.ProductSimpleVersionWithNameAndOptionalArchitecture)"
Description="$(var.ProductSimpleVersionWithNameAndOptionalArchitecture)"
Target="[$(var.ProductDirectoryName)]pwsh.exe"
WorkingDirectory="$(var.ProductDirectoryName)"
Target="[$(var.ProductDirectoryName)]pwsh.exe"
Arguments="-WorkingDirectory ~"
Icon = "PowerShellExe.ico" />
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
<!-- HKMU is HKLM when installing perMachine and HKCU when installing perUser-->