question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

launch arguments not being correctly passed when using "Run As Administrator"

See original GitHub issue

Describe 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:

  1. Have Discord installed and confirm the shortcut in your start menu is similar to the one in Figure 1 (version/path may be different)
  2. In Flow navigate to Discord then do “Launch As Administrator”
  3. Note that the UAC prompt is missing the arguments from the shortcut (see Figure 2)
  4. Close the UAC dialog and attempt to launch the shortcut as Administrator from the Windows Start menu
  5. Note that the UAC prompt correctly has the arguments from the shortcut (see Figure 3)

Screenshots Figure 1: image

Figure 2: image

Figure 3: image

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:

2022-05-05.txt

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
nachmorecommented, Aug 1, 2022

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.

0reactions
VictoriousRaptorcommented, Dec 23, 2022

Fixed in 1.10.0

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found