Run programs by Wscript.shell 
Author Message
 Run programs by Wscript.shell

I created a vb script by which a program will be started. The code is as
follows:

Dim WshShell
Const vbNormalFocus = 3
DIM ProgLoc
ProgLoc = "D:\Prog\msoffice\Office\msaccess.exe /runtime /wrkgrp " & Chr(34)
& "g:\Acmos\Software\System.mdw " & Chr(34) & Chr(34) &
"G:\acmos\daten\pint32.mdb" & Chr(34)
Set WshShell = Wscript.CreateObject("Wscript.Shell")

WshShell.Run ProgLoc, vbNormalFocus, true

This works fine.
But how can I avoid to start a 2nd session, if this program is already
loaded ?
I.e. I need a If .. then .. procedure, like If application is running then
activate application, else start it. Has anyone an idea ?

Thanks

Lothar



Mon, 08 Oct 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. WScript.Shell.Run does not pass back errorlevels?

2. Problem running WScript.Shell from asp

3. Wscript.Shell Run method and ntvdm.exe

4. wscript.shell in .asp to run ftp script

5. WScript.Shell Run Doesn't Work???

6. Wscript.shell Run doesn't work

7. Wscript.shell refusing to run a command from an ASP page

8. Call WScript.Shell :: Run from AD Wallpaper

9. Wscript.Shell Run cmd with stdin ??

10. Does WScript.Shell Run method have a maxlength?

11. WScript.Shell Run has maxlength?

12. Is it a BUG with Run method of WScript.Shell

 

 
Powered by phpBB® Forum Software