We help IT Professionals succeed at work.

How to enter the password for RUNAS Automatically  ?

rami_halim
rami_halim asked
on
517 Views
Last Modified: 2010-05-18
i have  a logon script that disables cd-rom in a windows 2003 domain env.
but it has to be run using admin credentials..
how do i do that..
i basicly need to run the scrip as administrator..
but to do that in the script it will reveal the password in plain text..how do i avoid that ..
Comment
Watch Question

Commented:
Right, RunAs is meant for human.  You can try the scheduler, use AT command to run script instead of login. It runs with system authority.

The disabling should be done for the machine, not for the user. Beware that it is not friendly and can be counterproductive.

Commented:
Why don't you disable the CD drive via a group policy?  Since this is a 2003 domain, it should be a snap!

Author

Commented:
i need somethin to disable/enable cd-rom interactivly

Commented:
Please define: Interactively?
As in: Whenever i wish i can enable or disable a cd-rom on any or all machines?
That's alot to ask...

For disabling/enabling cd-roms in a windows 2003 domain, the simplest answer would be to use a group policy.
Open the properties of the desired target OU(or domain, if that is the target) and in the GP Tab create and new
Group policy.  Edit the policy to your desire(removing whatever drive/shell/file access you want) and then apply
the policy. On the next logon to the domain CD-ROM access should be disabled for all applied users.


     Deus

Author

Commented:
i have searched but not found an entry in GPO to disable cd-rom.. if there is it would solve my problem...
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
:) THANX DEUS..gonna check'em out n let ya know

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
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
Empower Your Career
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

Ask ANY Question

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

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.