Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBScript GetObject

Status
Not open for further replies.

OraMs

Programmer
Feb 12, 2000
40
US
I'm attempting to test if a certain application has already been launched. What am I doing incorrectly? Thanks.

When I use function in this format:
Code:
set WshShell = GetObject("c:\app_diam.exe","WScript.Shell")
I get the following message:

Filename or class not found during Automation operation: GetObject


When I use function in this format:
Code:
set WshShell = GetObject(,"WScript.Shell")
I get the following message:

ActiveX component can't create object: GetObject



 
When I do
Code:
Set WshShell = CreateObject("WScript.Shell")
it works fine. However, after the first time the application is launched, I need to activate only. Not launch another instance of the application.

 
CORRECTION

I meant to say:

after the first time the application is launched, I need to return the existing instance of the application. Not create a NEW instance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top