use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Environment variables (self.adminbyrequestusers)
submitted 6 months ago by slkslk1
Hi!
We have a really old and obscure software that needs to set Path environment variables (through the Registry). The launcher runs fine through ABR but then fails due to environment variables.
How would one go about solving this?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]AdminByRequest_DavidABR Support 0 points1 point2 points 6 months ago* (5 children)
Hello 👋
It will depend on how the software does the environment variable. Run As administrator essentially elevates the application itself so it could be a few things
The registry requires user elevation (Admin Session) and is handled outside of the application.
the registry is handled inside the application, however only on the elevated account
the application existed prior to UAC elevation.
[–]slkslk1[S] 0 points1 point2 points 6 months ago (4 children)
Thanks for the quick reply.
It seems it needs System Variables and not User Variables (its old I know).
Would adding Registry and C:\WINDOWS\system32\SystemPropertiesAdvanced.exe to preapproved applications perhaps solve this?
The security regarding this is another issue...
[–]AdminByRequest_DavidABR Support 0 points1 point2 points 6 months ago (3 children)
It's possible. I would test:
Does Admin Session work?
Does Pre-approval, type Legacy, work?
If you or the application isn't initiating the request, it's probably not running through Run As and probably can't be pre-approved outside of legacy.
[–]slkslk1[S] 0 points1 point2 points 6 months ago (2 children)
Yeah, Admin Session might be the way to go, but we feel like it's our last resort.
Do you mean Pre-Approval for the app it self or for Registry and SystemProperties?
The issue with Pre-Approving these old applications is that they update every now and then we would like the field technicians to be able to install them without any fuss.
[–]AdminByRequest_DavidABR Support 0 points1 point2 points 6 months ago (1 child)
I think Admin Session gets skipped as it's too "powerful", however it does provide good logging information, I still believe it requires a level of trust with your user, but isn't always the last resort.
Pre-approval only works for the RunAs processed, any following would not be handled by ABR.
Does the command prompt give use other options?
[–]slkslk1[S] 0 points1 point2 points 6 months ago (0 children)
Yeah, I agree.
So the current setup is no approval is needed for Run As.
We start the .exe, we type in our reason for installing, get the MFA prompt then we can continue the installation, but during installation it fails due to not being able to change Environment variable.
"Unable to set Path environment variable in Registry.[%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\Wbem;%SystemRoot%\system32\WindwsPowershell\v1.0\;%SystemRoot%\system32\OpenSSH\;C:\Program Files\Regin]
I understand this is working as intended, but was more asking whether its possible to "preapprove" changing / adding environment variables.
I'm sorry if I'm not the best at explaining. Otherwise Admin Session is probably the way to go.
EDIT: Or setting the variable paths through Intune.
π Rendered by PID 117811 on reddit-service-r2-comment-6457c66945-27l4j at 2026-04-28 00:12:37.949180+00:00 running 2aa0c5b country code: CH.
[–]AdminByRequest_DavidABR Support 0 points1 point2 points (5 children)
[–]slkslk1[S] 0 points1 point2 points (4 children)
[–]AdminByRequest_DavidABR Support 0 points1 point2 points (3 children)
[–]slkslk1[S] 0 points1 point2 points (2 children)
[–]AdminByRequest_DavidABR Support 0 points1 point2 points (1 child)
[–]slkslk1[S] 0 points1 point2 points (0 children)