Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
I was not considering SU and task scheduler. I have previously suggested using OpenDsObject but redbird seems to want to use an ADO query. It would seem that we should be able to authenticate with the OPEN method. My first attempt failed but I am going to try again.
obviously the error comes from: $oConnection1.Properties("Password") = "ABC123xyz"
now, can kixtart even do what you want here? "properties" is a collection of properties... but can kixtart point to the pasword property and set the pass. thinking here but can't think of succesfull example
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
The $x.Properties("PropName") seems like it should be redundant since the OPEN method permits the use of a user and password as well. I have tried the code without the $x.Preoperties("") lines without success.
You cannot specify credentials in a WMI Moniker. Monikers are used with VBScript GetObject function. To specify credentials, you must use VBScript's CreateObject function in combination with the WMI Scripting Library's "WbemScripting.SWbemLocator" object. SWbemLocator provides a single method named ConnectServer that accepts alternate credentials
There are two ways to connect to WMI - GetObject("winmgmts:") and CreateObject("WbemScripting.SWbemLocator"). You must use the latter if you want to supply alternate credentials
ALSO - Other method '----Binding to a domain with alternate credentials Set dso = GetObject("WinNT:") Set dom = dso.OpenDSObject("WinNT://" & domainName, userName, password, ADS_SECURE_AUTHENTICATION)
Registered: 2002-06-26
Posts: 10
Loc: Illinois State University - No...
Jens,
Could you give me an example of how I would apply your function to this application? I am a bit confused on where I would use this. I have a kix script that can call another script, but would kix32 be the application that would run under the other credentials?