UAC after user app

is there any way how to run script below under user without admin permissions?
curerntly i cannot see anything related to admin permission in script below:

$userProfile = $env:USERPROFILE
$newValue = “$userProfile\AppData\Roaming\SAP.xml”
$sourceFile = “$dirFiles\SAP.xml”

Copy the XML file to the new location

Copy-Item -Path $sourceFile -Destination $newValue

Set the environment variable

[Environment]::SetEnvironmentVariable(“SAPLOGON_LSXML_FILE”, $newValue, “User”)

every time im using this , UAC prompt appears. could you help me ?

I bet you have AppLocker enabled and users can only use “Constrained Language”

This might work to Set the environment variable:

Set-Item -Path Env:\SAPLOGON_LSXML_FILE -Value $newValue

Have you set <Toolkit_RequireAdmin>False</Toolkit_RequireAdmin> in AppDeployToolkitConfig.xml?

Using Set-Item like that will only set a temporary variable for the current session btw.

1 Like

thanks, that was a trick. it sounds like i rewrite it with my branding with this xml.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.