Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: rrc1962 on January 29, 2010, 11:35:52 AM
-
I'm trying launch an external app from a button using VBScript. the following code is supposed to work but doesn't on a Mach screen. Can anyone point me in the right direction? Perhaps there is another way to launch an app from within Mach using a button or menu item?
Dim commandLine, WshShell
commandLine = "C:\app.exe"
Set WshShell = Server.CreateObject("WScript.Shell") ' I get object not supported error on this line.
Call WshShell.Run (commandLine,8,true)
Set WshShell=Nothing
Thanks
-
HI,
Here's a code fragment I use for launching acrobat reader to open a doc file:
Option Explicit
' code to open the pdf User manual
Dim CmdString As String
Const Filename = "C:\Mach3\Documentation\machStdMill\MachStdMill User Manual.pdf"
Const AppFQFN = "C:\Program Files\Adobe\Reader 8.0\Reader\AcroRD32.exe"
CmdString = """" & APPFQFN & """" & " " & """" & FileName & """"
Shell(CmdString)
Dave