jameswhite1979
Senior member
I have been tasked with writing effectively a user selection GUI in VBS that writes out to a text file that the migration application can use to select the users to be migrated. It needs to be written in VBS. To display all users local and network (domain) with a checkbox option next to each account. Once selected and the user clicks next the selected names and written to a text file. I assume that this is possible with VBS. So far I have a script that list the local users as an 'echo' command:
''''''''''''''Start''''''''''''''''
Sub ListUsers( strDomain )
Set objNetwork = Wscript.CreateObject("Wscript.Network")
computerName = objNetwork.ComputerName
'WScript.Echo computerName
Set objComputer = GetObject("WinNT://" & computerName )
objComputer.Filter = Array( "User" )
For Each objUser In objComputer
WScript.Echo "User Name: "& objUser.Name&" Fullname: "& objUser.Fullname&""
Next
End Sub
' Main
Dim computerName
ListUsers( computerName )
''''''''''''''End''''''''''''''''
''''''''''''''Start''''''''''''''''
Sub ListUsers( strDomain )
Set objNetwork = Wscript.CreateObject("Wscript.Network")
computerName = objNetwork.ComputerName
'WScript.Echo computerName
Set objComputer = GetObject("WinNT://" & computerName )
objComputer.Filter = Array( "User" )
For Each objUser In objComputer
WScript.Echo "User Name: "& objUser.Name&" Fullname: "& objUser.Fullname&""
Next
End Sub
' Main
Dim computerName
ListUsers( computerName )
''''''''''''''End''''''''''''''''