How to change compatibility options for an exe file in a batch file on Windows 7?

1285 pts.
Tags:
.exe
Batch files
Microsoft Windows 7
Windows 7 Administration
Windows Batch Files
Windows XP SP2
Is there a way to change the compatibility options on an executable file in a batch file? I'd like to be able to set it to run as "xp sp2" or run as administrator.
Is there a way to do that?


Software/Hardware used:
Windows 7

Answer Wiki

Thanks. We'll let you know when a new response is added.

Create another batch by the following….
runas /user:<adminusername> /savecred x:\xxxx.bat
Now change ur original batch file name as xxxx.bat & also “adminusername with admin account name.
Remember, this will ask for admin password on first run only.

Thanks!

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: