Problem:
Modules executed in a configuration are executed in an elevated context. Disabling the elevation service may not be an option because other components of the ProU client depend on elevation.
Symptoms:
There may be some scripts and executables that can not be run with elevation. For example, OneDriveMapper (https://gallery.technet.microsoft.com/office/OneDriveMapper-automaticall-d7d498b0), checks for elevation and will not run properly even if the elevation check is disabled.
Resolution - Example useing a custom power shell wrapper for OneDrive
- Copy the script/executable locally to the base image.
- Create a batch file that will execute the script/executable first. Then add a line to execute the ProU userinit.
For Example:
@echo off
powershell.exe -executionpolicy bypass c:\programdata\onedrivemapper.ps1
"C:\Program Files\ProfileUnity\UserInit.exe" - Edit userinit in HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\
- Remove the ProfileUnity userinit entry
- Add the path and filename of the batch file.
When the ProU user logs in, userinit value will point to the batch file.
The batch file will execute the script/executable first without elevation. Then the ProU client will execute as normal.
Product: ProfileUnity
Product Version: 6.5+