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)\...\...\...\
V:
cd V:\...\...\
copy (NewFILE) C:\windows\system32\drivers\etc\(NewFILErnm)
c:
net use /DELETE V:
exit

------------------
------------------

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.

------------------
------------------

IF
Condition One

Then
Run Batch File

Else
Don't Run Batch File

------------------
------------------

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.