Help with visual basic and adsi

  • Thread starter Thread starter tincho
  • Start date Start date
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
 
Greetings,
You should probably post a vb question of this depth in a vb related
newsgroup. The likelyhood of getting a vb expert response will greately
improve.
 
Paul said:
Greetings,
You should probably post a vb question of this depth in a vb related
newsgroup. The likelyhood of getting a vb expert response will greately
improve.

Or maybe in the ADSI group:

microsoft.public.adsi.general
 
Back
Top