views:

74

answers:

1

Dear All,

I'm trying to run some automated test using a batch file. I have written all these test cases in VSTS 2008. When I run these test cases using VS IDE, it ran succesfully. But once I try to run my test case using a batch file, it throws error "System.ComponentModel.Win32Exception: The requested operation requires elevation."

As per my understanding if we can run the VS command prompt as admin, this will solve my problem. So could you please help me "how I can run the VS cmd as admin from a batch file". I have already used this runas /user:\username cmd but it doesn't solve my problem.

Thanks, Pritam

A: 

Hi All,

I got my answer---I have created the batch file. And then I create one shortcut of this batch file. And then in the advanced properties of this shortcut file I set it to open as admin. In this way it solved my problem. And all test cases running fine from batch file.

Thanks, Pritam

Pritam Karmakar