SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Sep 2010
    Location
    TN, India
    Posts
    377
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    SystemUtil.Run - ByPass UAC prompt

    Hi,
    Any methods to open the application with admin permissions in QTP?
    We can do it by WScript.Shell to my knowledge. But I want know any other ways in QTP.

    Please correct me if am wrong.
    Thanks...
    Thank/Like to help others if my input helped you !!!
    I am speaking for myself, not for my employer nor any one.
    Automation Ecstasy

  2. #2
    Member
    Join Date
    Sep 2010
    Location
    TN, India
    Posts
    377
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: SystemUtil.Run - ByPass UAC prompt

    When I run my AUT like,
    <font class="small">Code:</font><hr /><pre>
    SystemUtil.Run "C:\Program files\My app path\bin\MyApp.exe"
    </pre><hr />
    FATAL ERROR: We could not open up the MyApp.exe.vmoptions file.
    If I run using Shell like
    <font class="small">Code:</font><hr /><pre>
    Dim shell
    Set shell = CreateObject("WScript.Shell")
    'shell.Exec "C:\Program files\My app path\bin\MyApp.exe"
    shell.Run "C:\Program files\My app path\bin\MyApp.exe"
    </pre><hr />
    Here Exec throws same error returned by QTP. Run throws "General Error" with Number -2147024894 and empty description.

    Can anyone help me out to start my AUT with "Run As Administrator" option because QTP will identify controls only if I do so.

    Thanks...
    Thank/Like to help others if my input helped you !!!
    I am speaking for myself, not for my employer nor any one.
    Automation Ecstasy

  3. #3
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: SystemUtil.Run - ByPass UAC prompt

    Then you should run QTP as administrator and all will work fine

  4. #4
    Super Member
    Join Date
    Dec 2005
    Location
    USA
    Posts
    1,407
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: SystemUtil.Run - ByPass UAC prompt

    [img]/images/graemlins/smile.gif[/img] [img]/images/graemlins/smile.gif[/img] [img]/images/graemlins/smile.gif[/img]


    well i guess the only work around for you is using the send keys but again as you know its not a reliable solution.
    ------------
    Chikki
    when things gets harder ,the harder gets going

  5. #5
    Member
    Join Date
    Sep 2010
    Location
    TN, India
    Posts
    377
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: SystemUtil.Run - ByPass UAC prompt

    Thanks for all inputs guys.
    Finally I turned OFF UAC and Using WScript.Shell, I achieved like,
    <font class="small">Code:</font><hr /><pre>
    shell.CurrentDirectory "my App path"
    shell.Exec "myapp.Exe"
    </pre><hr />
    After set CurrentDirectory, it worked fine. Some EXE's expecting config/support files while loading. This is the problem here.

    Thanks...
    Thank/Like to help others if my input helped you !!!
    I am speaking for myself, not for my employer nor any one.
    Automation Ecstasy

  6. #6
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: SystemUtil.Run - ByPass UAC prompt

    You can also use below

    SystemUtil.Run "myapp.Exe", , "my App path"

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:10 AM.

Copyright BetaSoft Inc.