troubleshooting Question

Run a batch program based on who is logged in

Avatar of al4629740
al4629740Flag for United States of America asked on
Microsoft DOSProgramming
3 Comments2 Solutions408 ViewsLast Modified:
I have two users.  If Administrator logs in I want to run this code:

cd C:\Terminal Share\
start "" /wait "CAP Tracking System at CAP.exe"

If Intern logs in then I want to run the following code:

cd C:\Terminal Share\
start "" /wait "CAP Tracking System.exe"

How can I make an If Then statement with Batch files?  Is it possible?

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros