Name | Modified | Size | Downloads / Week |
---|---|---|---|
1.0 | 2018-06-01 | ||
README.md | 2018-05-31 | 1.2 kB | |
Totals: 2 Items | 1.2 kB | 0 |
launchUnelevated
launchUnelevated <program> [<args>]
This little tool uses Windows Shell to launch a given program, so that it uses the user's credentials instead of elevated/admin credentials. For example, this can be handy for interacting with your source code editor (e.g. telling it to update its indexes).
Source: This StackOverflow answer by user zett42, who got this from Raymond Chen's blog post.
'launchUnelevated' requires Explorer to be running, and the user to be logged in.
Known limitations and issues
- Since this is 'shell execute', it doesn't wait for the program to finish, and you can't get the program's return code. launchUnelevated does return success/error codes, but they only indicate the success/failure of starting the given program.
- Errors generated by 'launchUnelevated' itself, are written to stdout, not stderr.
- If you need to escape arguments (e.g. args with spaces in them), that probably works weirdly.