Can someone help me with problem which i have, and the problem is that i cannot join domain users using script:

Set oWshNet = CreateObject("WScript.Network" )
Set oShell = Wscript.CreateObject("Wscript.Shell")
sUser = oShell.ExpandEnvironmentStrings("%USERNAME%")
sNetBIOSDomain = oWshNet.UserDomain
sComputer = oWshNet.ComputerName
Set oGroup = GetObject("WinNT://" & sComputer & "/DB2USERS,group" )
Set oUser = GetObject("WinNT://" & sNetBIOSDomain & "/" & sUser & ",user" )
' suppress errors in case the user is already a member
If (oGroup.IsMember(oUser.ADsPath) = False) Then oGroup.Add(oUser.ADsPath)End If
On Error Goto 0

to a group, if i dissable UAC and add user admin rights then it works but that is not solution for me, so I`m asking you guys have any one met with a problem like my, coz everything works on XP but i need the same to work on Win 7.

plaes help!
0 Comments   [ + ] Show Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.


Ahhhhhhhhhh...the joys of IBM's DB2 LOL.

You can - and should - avoid the requirement to create the local groups and users if you run a command line to tell it to use domain accounts and groups. Unfortunately, I can't recall what that command line is but it's documented on IBM's web site. Somewhere...
Answered 08/25/2011 by: VBScab
Red Belt

Please log in to comment
thank you for the information, ilooked every where and did not find anything about that, maybe didi not loked in correct place I dont know but still i think the best part would be some script or maybe some one have found such command line?
Answered 08/25/2011 by: lanselots
Fourth Degree Brown Belt

Please log in to comment
Answer this question or Comment on this question for clarity