Start New Discussion within our Software Development Community

I am new to the VB Scripting area and have done a few simple test scripts to get a feel for some of the commands. I am looking for a command that would use a domain user account to be known as a domain admin before running the actual command set for the required actions.

At the moment I only have a small snipit of what we are trying to incorporate into this file setup in a batch file.


cd C:\windows\system32\drivers\etc\
route add -p !!!.!!!.!!!.!!! mask 255.255.!!!.!!! !!!.!!!.!!!.!!!
rename (OldFILE) (OldFILErnm)
net use V: \\(FileServer)\...\...\...\
cd V:\...\...\
copy (NewFILE) C:\windows\system32\drivers\etc\(NewFILErnm)
net use /DELETE V:


I would like to have a code set that would request a user account and verify that it is a domain admin account before attempting the run, and if false then end its execution.

Any assistance would be appreciated.

Actually, I'll make this a little simpler...

Lets take my batch file I have up on my previous post, and combine it with an IF THEN ELSE statement.


Condition One

Run Batch File

Don't Run Batch File


Though this would make it easier, I am looking to ad several other files to this line as well.

This question has already been answered. Start a new discussion instead.