Skip to content

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

Merged
Travis Plunk (TravisEz13) merged 2 commits into
PowerShell:masterfrom
SteveL-MSFT:shortcut-homedir
Jun 20, 2018
Merged

Travis Plunk (TravisEz13) merged 2 commits into
PowerShell:masterfrom
SteveL-MSFT:shortcut-homedir

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Jun 14, 2018 •

Copy link
Copy Markdown
Member

PR Summary

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

Fix #5705

PR Checklist

@TravisEz13

Copy link
Copy Markdown
Member

Your commit isn't associated with your github id. Can you fix that?

set workingdirectory to user home on shortcut

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if you have tested it and it works.

Comment thread assets/Product.wxs Outdated
Target="[$(var.ProductDirectoryName)]pwsh.exe"
Target="[$(var.ProductDirectoryName)]pwsh.exe"
Arguments="-WorkingDirectory ~"
WorkingDirectory="$(var.ProductDirectoryName)"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems we can remove the line.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, will remove.

@TravisEz13

Copy link
Copy Markdown
Member

I'd suggest addressing Ilya (@iSazonov) 's comment

@TravisEz13
Travis Plunk (TravisEz13) merged commit b25c1f6 into PowerShell:master Jun 20, 2018
@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the shortcut-homedir branch June 20, 2018 02:46
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
…to the user home directory (PowerShell#7072)

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

Fix PowerShell#5705
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Installer should start PS Core with user's home dir as the working dir

4 participants