• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

VBS list users and pass details to a text file

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''''''''''''''''

 
Windows Script VBS really lacks the capability to create User Interfaces. I would recommend you do it in .Net or VB 6.0

You do have a few options though.
If you know vbscript and the DOM well you can use HTML Applications to create the UI:
http://msdn.microsoft.com/en-us/library/ms536496.aspx

Or create a UI in IE from script by creating the IE COM Object:
Sameple Script doing this: http://cwashington.netreach.ne...9&ScriptType=component

You can compile an external COM dll which can be accessed from vbscript that allows you to create GUI elements:
An example in VB is Wsh LiteWeight Forms... http://cwashington.netreach.ne...default.asp?topic=code
 
Thanks KB, Glad that I know it is not worth the effort trying to make this work. I will take a stab at VB6 but its been a few years! Thanks...
 
Back
Top