Skip to content

v111: Registry modifications / tiTkn.txt script not working #57

@drujd

Description

@drujd

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions