We help IT Professionals succeed at work.
Get Started

how to run add logon VBS script as administrator

172 Views
Last Modified: 2017-11-21
Question: I need when domain users log on, VBS logon script will be run include this command: route add /p 201.2.3.4 mask 255.255.255.255 10.10.10.10. This command need administrator or elevated user mode.  How to do it from VBS script? Could you give me a sample?

Environment:
Server level Windows Server 2008 R2
Desktops: Windows 7

I know this question had been asked many many times, but my situation is a little bit special. I don't want users type in administrator account name and password. I don't want my administrator account name and password recorded in VBS script and be found by any personal who can access server and edit the VBS file.

Thank you.
Comment
Watch Question
End-user support
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 3 Answers and 12 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE