2 Replies Latest reply: Jun 10, 2010 6:19 AM by Stefan Bäckstrand RSS

    Batch vbscript for 64-bit server

       

      I am trying to create a vbscript to run an application in publisher that has a macro. After many posting I understand that to invoke

      a macro it requires an external program. I have found several good examples in several postings.

      I have been able to develop this .vbs and it can run from the desktop, but when scheduled I get a "not a valid Win32 application" error.

      The error when run from Publisher as an external program follows:

      (2010-06-09 16:51:06) Information: Executing ClusterID=1, QDSID=e1138bad-f329-58ff-bb28-5b56374802c7 QDSMain.ExternalProgramTask

      (2010-06-09 16:51:06) Information: Starting task "Run backup VBS" (Attempt 1 of 1)

      (2010-06-09 16:51:06) Information: Max run time: 1.00:00:00

      (2010-06-09 16:51:06) Information: Executing D:\Qlikview\applications\qa\bi\qv\staging\Run_Backup.vbs

      (2010-06-09 16:51:06) Information: Executing commandline: "D:\Qlikview\applications\qa\bi\qv\staging\Run_Backup.vbs" in folder "D:\Qlikview\applications\qa\bi\qv\staging".

      (2010-06-09 16:51:07) Error: Exception=System.ComponentModel.Win32Exception: The specified executable is not a valid Win32 application.

      (2010-06-09 16:51:07) Error: at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)

      ?

      The VBScript: Run_Backup.vbs follows:

      Set MyApp = CreateObject("QlikTech.QlikView")

      Set MyDoc = MyApp.OpenDoc ("D:\Qlikview\applications\qa\bi\qv\staging\BackupDir.qvw","","")

      Set ActiveDocument = MyDoc

      ActiveDocument.Reload

      ActiveDocument.GetSheetObject("BU01").Press

      Set MyDoc = Nothing

      MyApp.Quit

      Set MyApp = Nothing

       

      The server is a 64-bit machine so what changes must I make to the .vbs

       

      Thanks,

      Haralds