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