Friday, October 23, 2009

How to runas in Win's XP a program with Admin privileges without password prompt?

Solved such way:

1. Create a BAT file with the following content in the directory "C:\Program Files\Dir_with_program_to_run\your_program_name_to_run.bat": (create "your_program_name_to_run.bat")

@REM ======= your.bat file ======
@runas /user:Your_Administrator_name /savecred "C:\Program Files\Dir_with_program_to_run\your_program_name_to_run.exe"
@REM ======= fin your.bat file ======

2. I modified the path of the shortcut from Desktop to point to the created BAT file.

3. Start the shortcut (double click ;) ). You will be prompted for password only once.
Enter the Your_Administrator_name password.

4. Close the program, start the program again. Program should start without asking you for a password again.

Simple, isn't it? Enjoy!

No comments:

Post a Comment