-
Notifications
You must be signed in to change notification settings - Fork 272
Open
Description
The tiTkn.txt script for modifying registry with TrustedInstaller credentials is not working for me. With debug on, the error is
Cannot convert argument "0", with value: "", for "OpenProcessToken" to type "System.IntPtr": "Cannot convert null to type "System.IntPtr"."
At line:9 char:1
+ [void]$Win32::OpenProcessToken($sysProc.Handle, 6, [ref]$sysTkn)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodException
+ FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument
I am not sure whether the error is the cause, but the script fails to acquire TrustedInstaller privileges.
The actual commands ARE still executed, so it actually works on older builds that allow modifying e.g. SideBySide\Configuration with standard administrator privileges, but fails on newer builds.
Could maybe something like PowerRun be used?
Metadata
Metadata
Assignees
Labels
No labels