»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 08-20-2003, 06:40 AM   #1 (permalink)
Registered User
 
DVNT1's Avatar
 
Join Date: Oct 2001
Location: Ohio
Posts: 5,577
DVNT1 is on a distinguished road
vbs scripting - option box?

I have a script create new domain user which creates a domain user and set certain attributes (logon script, home directory, password, account expiration, etc.).

I also have a separate script that writes all Domain User Groups to a text file.

When the create new domain user runs, an input box pops up asking for first name and then another for last name, user group to associate with, and etc.

I want to option box to be created based on the values in the text file, and the options selected, to be passed into the create domain user script.

Suggestions?

DVNT1 is offline   Reply With Quote
Old 08-20-2003, 10:47 AM   #2 (permalink)
Registered User
 
Join Date: Oct 2001
Location: TOO close to Wash DC
Posts: 7,956
vass0922 is on a distinguished road
Ok so right now you have a couple of input boxes for first name last name etc.. and you want an option box for a few choices to pass to the script!?

Not quite sure what you're asking for
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>
vass0922 is offline   Reply With Quote
Old 08-20-2003, 11:09 AM   #3 (permalink)
Registered User
 
DVNT1's Avatar
 
Join Date: Oct 2001
Location: Ohio
Posts: 5,577
DVNT1 is on a distinguished road
Sorry, it seemed to make sense at the time.

For example, I have 50 Domain User groups that a new account could belong to. When running the script to create a new user, I just want to mark a box for each group that user should belong to. So to do this, ideally a form would be presented with all 50 choices and a checkmark box beside each choice. Then I just check all the related box this user needs and hit submit!

Am I going to need a Visual Basic development package or can just scripting do what I need. If jsut scripting, how?
DVNT1 is offline   Reply With Quote
Old 08-20-2003, 11:27 AM   #4 (permalink)
Registered User
 
Join Date: Oct 2001
Location: TOO close to Wash DC
Posts: 7,956
vass0922 is on a distinguished road
hmm
Well two options that I can see...
Either yes you unfortunately jump into using full VB...
OR
You can write up an ASP page that does it

Worst case scenario you MIGHT be able to skate by using Outlook forms.
I'd help ya out but I don't have access to an AD domain as I'm sure I'll probably come across doing something similar in the future.

I think the cheapest way would be to create an ASP page and just create a generic webform for the data input.
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>
vass0922 is offline   Reply With Quote
Old 08-20-2003, 11:34 AM   #5 (permalink)
Registered User
 
Gait_Keeper's Avatar
 
Join Date: Feb 2003
Location: Da Bronx, NY
Posts: 1,709
Gait_Keeper is on a distinguished road
Send a message via AIM to Gait_Keeper
you're the best Vass

let us know if what vass said works for you,OK?
Gait_Keeper is offline   Reply With Quote
Old 08-20-2003, 11:48 AM   #6 (permalink)
Registered User
 
DVNT1's Avatar
 
Join Date: Oct 2001
Location: Ohio
Posts: 5,577
DVNT1 is on a distinguished road
May be hard to believe but, I know even less about Active server pages than VBS.

Do you think with either the fulll VB package or ASP page I could have the Option List be recreated each time using either the text file or the script that gets the group info?
Code:
Option Explicit

Const ForAppending = 8

Dim objFSO 'File System object
Dim objFile 'File object used to open text file for output
Dim strFilePath 'Path to current directory
Dim oWshShell 'Windows shell script
Dim strComputer
Dim colGroups
Dim objGroup

Set oWshShell = CreateObject("Wscript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
strFilePath = objFSO.GetAbsolutePathName(".")
Set objFile = objFSO.OpenTextFile (strFilePath & "\domaingroups.txt",ForAppending,True)

strComputer = "mydomaincontroller"

Set colGroups = GetObject("WinNT://" & strComputer & "")
colGroups.Filter = Array("group")
For Each objGroup In colGroups
    Wscript.Echo objGroup.Name 

	'* Write to output file
	objFile.WriteLine objGroup.Name

Next
objFile.Close
DVNT1 is offline   Reply With Quote
Old 08-20-2003, 11:53 AM   #7 (permalink)
Registered User
 
Gait_Keeper's Avatar
 
Join Date: Feb 2003
Location: Da Bronx, NY
Posts: 1,709
Gait_Keeper is on a distinguished road
Send a message via AIM to Gait_Keeper
Quote:
Originally posted by DVNT1
May be hard to believe but, I know even less about Active server pages than VBS.


Close
[/code]
Oh
Gait_Keeper is offline   Reply With Quote
Old 08-20-2003, 12:00 PM   #8 (permalink)
Registered User
 
Join Date: Oct 2001
Location: TOO close to Wash DC
Posts: 7,956
vass0922 is on a distinguished road
what you'd do is have the code grab the info straight from the domain when the page loads so yeah that should work just fine as far as I know.

Really there's not a lot of difference between ASP and VBS except instead of writing to a message box or text file you're using html.

Instead of looping through and writing your lines to a text file, you'll add lines to a list box.

Myself I'm not real great at writing webpages so I just write up a quick application.

If you want, you can either post the code you already have up here or email it to me and I'll see if I can whip it up into an vb application real quick.


GK come on.. I don't think those posts are necessary as they don't help a bit.
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>
vass0922 is offline   Reply With Quote
Old 08-20-2003, 12:42 PM   #9 (permalink)
Registered User
 
DVNT1's Avatar
 
Join Date: Oct 2001
Location: Ohio
Posts: 5,577
DVNT1 is on a distinguished road
I appreciate the offer but I want to be able to make changes to this later so I'll order VB today and start learning that too.

I'll still send you what I have so far.

Btw, I created a script to check for the blaster worm (more specifically for the related msblast.exe process running on any domain computer). The script records which machines passed, failed, and were not able to be checked.

I've made a few other scripts if your interested:
- create desktop icon and add registry entries
- delete old profiles on workstations in a Domain
- find disable user accounts in AD
- find last logon for a computer account
- kill specified process and restart it (in my example it is GrpWise.exe)
- log which domain computers have and do not have ECC2 running, install/update as needed, then install it as a service)
- to create a task that runs at specified times
DVNT1 is offline   Reply With Quote
Old 09-11-2003, 05:51 PM   #10 (permalink)
Registered User
 
DVNT1's Avatar
 
Join Date: Oct 2001
Location: Ohio
Posts: 5,577
DVNT1 is on a distinguished road
just a quick note, I found a way to do this and it works great.

http://home.att.net/~wshvbs/index.htm#wshLtWtForms
DVNT1 is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 12:09 AM.