I follow an example from SO answer how to run QTP script from C#. However during Application object creation I get UnauthorizedAccessException. Any clues what might be wrong? Here is a screenshot of the exception and the source code.
Asked
Active
Viewed 319 times
3
-
Check if you can find it back in DCOM Config and tinker with the security settings. Control Panel + Admin Tools + Component Services. – Hans Passant Sep 26 '11 at 16:16
-
Or this answer: http://stackoverflow.com/questions/7558076/office-interop-issue-on-windows-server/7558244#7558244 – Hans Passant Sep 26 '11 at 17:59
-
DCOM Config doesn't have component with the CLSID mentioned in the exception. – Greg Dan Sep 27 '11 at 07:46
2 Answers
0
If you're on Windows 7 or Vista, have a go at starting your development area as Administrator, chances are you're getting an Access Violation.

Paul Talbot
- 1,583
- 1
- 14
- 28
0
Quoting the OP of the original post you refer to:
This code did work. However, for QTP version 10.0, I had to change using QTObjectModelLib; to using QuickTest;.
Might help if you are also using version 10.0.

Danra
- 9,546
- 5
- 59
- 117