Jump to content

Recommended Posts

Posted

I've got a simple script here:

 

Local $iPID = RunAs("<an admin user>", "<a domain>", "<a password>", 0, @comspec & ' /k c:/windows/SysWOW64/certutil.exe -config "<a pki ca server>\<a name>" -view -restrict "Issued Common Name=<a username>"', "", @SW_SHOW)

 

Everything between <> has been redacted for obvious reasons. I've tested a script which when run by my admin account directly brings back the correct details however if I try and run the script through autoit CertUtil throws up the following error:

 

CertUtil: -view command FAILED: 0x80040154 (-2147221164)
CertUtil: Class not registered

 

It is registered under the admin account I'm using otherwise it would not have work at the command line but for the last 3 hours I've been trying to figure out how and I'm at my wits end, any help would be appreciated with this.

 

Thanks,

 

Wes

Posted
3 hours ago, SadBunny said:

Just a wild guess... Have you used #requireadmin?

This, and try changing the working directory of RunAS to the folder where certutil.exe is (Your SysWow64 directory)

Posted

I haven't used requireadmin as it need to run without further input from the user. I'll try it with it to check though as well as the changing directory. and let you know.

 

Thank you.

 

Wes

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...