开发者

How do I run an app (TestComplete) as Administrator from the command line

Scenario....

I am writing a powershell scrip to Automate some UI Testing, there are a bunch of things that I have to do re, checking code out of a repository, building, copying installers, then at the end I want to run TestComplete and test the installer UI...

The Installer runs in elevated mode as it writes to program files, registry etc so, in order for my test script in TestComplete to see the msiexec process, TestComplete also needs to be run elevated. How do I do this from the command line? It does not appear that I can do this with runas, 1/ it just runs the app as the user (who has admin privileges) but not actually elevated and 2/ I can't supply a password in the 开发者_StackOverflow社区script.

Any ideas?


You can run a script elevatd by using the Start-Process cmdlet like so:

Start-Process <some_exe> -Verb runas
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜