launch arguments not being correctly passed when using "Run As Administrator"
See original GitHub issueDescribe the bug/issue When using “Run As Administrator” launch arguments (see Figure 1) from the shortcut being launched do not appear to be maintained. These same arguments appear to be correctly passed through when NOT using “Run As Administrator”. More specifically this is at least the ‘Target’ field and potentially the ‘Start in’ field on the shortcut.
To Reproduce I used Discord to reproduce this via the default Discord shortcut available on the start menu.
Steps to reproduce the behavior:
- Have Discord installed and confirm the shortcut in your start menu is similar to the one in Figure 1 (version/path may be different)
- In Flow navigate to Discord then do “Launch As Administrator”
- Note that the UAC prompt is missing the arguments from the shortcut (see Figure 2)
- Close the UAC dialog and attempt to launch the shortcut as Administrator from the Windows Start menu
- Note that the UAC prompt correctly has the arguments from the shortcut (see Figure 3)
Screenshots Figure 1:
Figure 2:
Figure 3:
Your System
Windows build number: Microsoft Windows [Version 10.0.19044.1586]
Windows language: EN-US
Flow Launcher version: 1.9.3
Flow Launcher Error Log No error appears to be actually logged but here is the log anyways:
Issue Analytics
- State:
- Created a year ago
- Comments:12 (3 by maintainers)
Top Results From Across the Web
How to run a batch file with arguments in administrator ...
After pressing a button, my batch file should get launched in ADMIN mode along with the arguments provided by user. This is the...
Read more >Run applications as administrator by default in Windows 10
Log In As Administrator · Go To Run ( WinKey + R ) · Type "secpol.msc" · Go To Local Polices > Security...
Read more >Is there any launch arguments available for Rockstar ...
When I open either launcher, I right click and run as administrator to make sure there's no issues with them communicating between each...
Read more >Troubleshoot Terminal launch failures
If your terminal is set to run as administrator only, and you are not launching VS Code as administrator, the terminal will not...
Read more >Windows Terminal command line arguments
Using command line arguments for Windows Terminal ... If no command is specified, then the command is assumed to be new-tab by default....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve root caused this to us not extracting arguments when a link resolves to an exe - essentially missing a call to
((IShellLinkW)link).GetArguments
).I’ll look into getting a PR for this one over the next couple of days.
Fixed in 1.10.0