Qlik Community

QlikView Publisher

Discussion Board for collaboration on QlikView Publisher.

Not applicable

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



Set MyDoc = Nothing


Set MyApp = Nothing

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



Tags (2)
2 Replies
Valued Contributor

AW:Batch vbscript for 64-bit server

Try to schedule it like this:

C:\Windows\SysWow64\csript.exe C:\full_path\Run_Backup.vbs



Batch vbscript for 64-bit server

The error speaks for itself:

"The specified executable is not a valid Win32 application"

.vbs scripts are run in a separate host environment, wscript or cscript. As biester suggests - run the script with the cscript engine.

Community Browser