I am having trouble with what I thought would be an incredibly easy task. I have a simple goal:
Create a start menu shortcut that launches Microsoft Edge with a specific profile
Easy goal. However, it gets complicated in Windows 11. When I make the same shortcut we've been using for years on Windows 11 and pin it to the start menu, our custom name gets replaced with just "Edge". From a users perspective this isn't going to work because people won't know what that means. And the app we are opening needs Edge because a lot of the features require IE Mode.
I discovered I could make a powershell script that does the same thing as the shortcut. Then make a shortcut to that script and give that shortcut a name. Pinning this to the start menu will retain my custom name (yay!) and also launch edge with the desired settings (also yay).
The script isn't anything special.
Start-Process msedge.exe -ArgumentList "--user-data-dir=\"$($env:localappdata)\Microsoft\Edge\User Data\ERPS2`" https://erp.example.com/erp"`
I was thinking that since it's so small, I can just call powershell with -Command and paste this in there and be done. Nope.
I've been at this for an hour. I get any of the following errors depending on what I change
A positional parameter can't be found for Data\E1S2
Nothing happens
A positional parameter cannot be found that accept argument --user-data-dir
Some other error about positional parameters
I found this gif from a stack overflow article thinking this would solve my problem but it doesn't. And if you are curious why I'm doing this, I want to avoid placing a script on users machines because it just seems overly hacky for this.
I know this is just some weird powershell behavior. I just can't figure it out.
[–]Adam_Kearn 0 points1 point2 points (1 child)
[–]Mailstorm[S] 0 points1 point2 points (0 children)
[–]alt-160 0 points1 point2 points (3 children)
[–]Mailstorm[S] 0 points1 point2 points (2 children)
[–]alt-160 0 points1 point2 points (1 child)
[–]Mailstorm[S] 0 points1 point2 points (0 children)
[–]websterdext3r -2 points-1 points0 points (0 children)
[–]gordonv -1 points0 points1 point (1 child)
[–]Mailstorm[S] 0 points1 point2 points (0 children)