Forum Discussion

adrian_g's avatar
adrian_g
Occasional Contributor
14 years ago

How can I run / open a file, process or executable without using TestedApps?

Hi All,


How can I run / open a file, process or executable without using TestedApps?


The file I want to open is “KA.application” which is a ClickOnce application but unfortunately the TestedApps section only allows typical executable files e.g.  EXE, CMD, BAT, COM.


I am running TC version 7.20.562.7 on Windows Vista.



I search help for a number of different keywords but with no luck.


Thanks,

Adrian

4 Replies


  • Hello Adrian,





    First, I recommend that you update TestComplete to version 8 or at least to 7.52.





    The Run a ClickOnce application article explains how to accomplish your task. Additionally, you can use the following way to add a ClickOnce application to the Tested Apps project item:

     - Add rundll32.exe to the TestedApps project item.

     - Insert the below string into the 'Command line parameters' field of the newly created item:

     dfshim.dll,ShOpenVerbShortcut "<path to application>"
  • ANW's avatar
    ANW
    Contributor
    I have the same issue now in my new job.



    They make their applications as ClickOnce apps.



    I have tried the solutions here for adding them to TestedApps, but I get an error:





    PLATFORM VERSION INFO


    Windows : 6.1.7600.0 (Win32NT)


    Common Language Runtime : 4.0.30319.1


    System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)


    clr.dll : 4.0.30319.1 (RTMRel.030319-0100)


    dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100)







    ERROR SUMMARY


    Below is a summary of the errors, details of these errors are listed later in the log.


    * Activation of "d:\Toolbars\MVNO\VictorTest.appref-ms" resulted in exception. Following failure messages were detected:


    + Invalid URI: The URI scheme is not valid.







    COMPONENT STORE TRANSACTION FAILURE SUMMARY


    No transaction error was detected.







    WARNINGS


    There were no warnings during this operation.







    OPERATION PROGRESS STATUS


    No phase information is available.







    ERROR DETAILS


    Following errors were detected during this operation.


    * [19-01-2011 15:59:51] System.UriFormatException


    - Invalid URI: The URI scheme is not valid.


    - Source: System


    - Stack trace:


    at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)


    at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)







    COMPONENT STORE TRANSACTION DETAILS


    No transaction information is available.




    Now I am unsure as to what exactly is meant with "<path to application>".



    is that the path to my VictorTEST.appref-ms file?? .. or the actual exe file?



    This is what my current command line looks like:



    dfshim.dll,ShOpenVerbShortcut "d:\Toolbars\MVNO\VictorTest.appref-ms"



  • Hello Anders,





    Please refer to my answer that concerns executing an application by using rundll32.exe in this thread.





    Another way to launch an application from TestComplete is to use the Run method of the WScript.Shell object:







      var WshShell = Sys.OleObject("WScript.Shell");

      WshShell.Run(<path to .appref-ms>);







    See also the following MSDN library article: Run Method (Windows Script Host).