cancel
Showing results for 
Search instead for 
Did you mean: 

Launching the Desktop Application

SOLVED
Highlighted
New Contributor

Launching the Desktop Application

I am trying to launch a desktop application using testcomplete but its not getting launched. So i did some sresearch and got to know that its happening because of the path i am giving in variable but if i use same path suing run command then applicaiton gets open. So i checked with notepad application which gets open but my application is not opening becase of an extra space given in folder name. 

So can anyone help me how to pass path if path has an space between folder name - 

Code is as below - 

 

Function LaunchApp()

  Dim appPath = "C:\\App\\Ellie Mae\\ApplicationName.exe"     ' here folder Ellie Mae has an space between Ellie and Mae, so application is not opening

  Call Sys.OleObject("WScript.Shell").Run(appPath)

 

End Function

So can anyone help me how to write the path when there is an space between folder name?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: Launching the Desktop Application

Hi,

 

Like in command prompt you must enclose path into quotes.

In case of VBScript it will be like this:

Dim appPath = """C:\\App\\Ellie Mae\\ApplicationName.exe""" ' three quotes at the beginning and the end

 

Also you may consider to add your application to Tested Applications and start it using TestedApps functionality: https://support.smartbear.com/testcomplete/docs/testing-with/tested-apps/index.html

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
1 REPLY 1
Community Hero

Re: Launching the Desktop Application

Hi,

 

Like in command prompt you must enclose path into quotes.

In case of VBScript it will be like this:

Dim appPath = """C:\\App\\Ellie Mae\\ApplicationName.exe""" ' three quotes at the beginning and the end

 

Also you may consider to add your application to Tested Applications and start it using TestedApps functionality: https://support.smartbear.com/testcomplete/docs/testing-with/tested-apps/index.html

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Here?
Join us and watch the welcome video:
API Testing Mistake #2
APITestingMistake#2
Top Kudoed Authors