T
tincho
Hi, I am programing with ADSI under VB 6, and I cant
change the service account on a remote computer.
What's wrong?
The txtservice comes from a form with the caption of the
check box (it calls spooler). Now iam trying with the
spooler service.
Private Sub Command1_Click()
txtserviceaccount = "domain\account"
pwd = "123456"
txtserver = Text1.Text
txtservice = Check1.Caption
Dim ocomputer As IADs
Set ocomputer = GetObject("WinNT://" & txtserver & "/" &
txtservice & ",service")
List1.AddItem ocomputer.Get("ServiceAccountName")
ocomputer.Put "ServiceAccountName", txtserviceaccount
ocomputer.SetInfo
MsgBox Err.Number
End Sub
change the service account on a remote computer.
What's wrong?
The txtservice comes from a form with the caption of the
check box (it calls spooler). Now iam trying with the
spooler service.
Private Sub Command1_Click()
txtserviceaccount = "domain\account"
pwd = "123456"
txtserver = Text1.Text
txtservice = Check1.Caption
Dim ocomputer As IADs
Set ocomputer = GetObject("WinNT://" & txtserver & "/" &
txtservice & ",service")
List1.AddItem ocomputer.Get("ServiceAccountName")
ocomputer.Put "ServiceAccountName", txtserviceaccount
ocomputer.SetInfo
MsgBox Err.Number
End Sub