Qlik Community

QlikView Publisher

Discussion Board for collaboration on QlikView Publisher.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

invoke-command from Publisher

Good Morning,

i am trying to run a VB Script file on a remote host and trigger the exectution of this script by a Supporting Task in Publisher.

When i run the invoke command call from my own local PC it works as it should:

invoke-command -asjob -computer REMOTE_HOST -scriptblock { cscript.exe "D:\VBScripts\test_2.vbs" }

But the same command executed from a Supporting Task in Publisher fails with this error:

(2016-07-07 09:25:23) Error: Exception=System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified || at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) || at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) || at SolutionGlobal.DOSExecute.ExecuteCommand(ILogBucket i_LogBucket, String i_Command)

(2016-07-07 09:25:23) Error: The process didn't start

Any idea how i can make this work - or any other approach that makes this work is greatly appreciated.

Thanks in advance!

6 Replies
marcus_sommer
Not applicable

Re: invoke-command from Publisher

The user which run the publisher might not have the proper access rights to these file. Also the path might be a problem and replaced with an unc-path or maybe the drive mounted with a net use statement.

- Marcus

Not applicable

Re: invoke-command from Publisher

The user which run the publisher might not have the proper access rights to these file.

It should, as Publisher also distributes to this location.

Also the path might be a problem and replaced with an unc-path or maybe the drive mounted with a net use statement.

Tried that. Made no difference.

Any other idea how i can get this to work maybe ?

marcus_sommer
Not applicable

Re: invoke-command from Publisher

Maybe there is any security-setting which need to be enabled like it is within the user-profil in tab security to allow the execution of scripts.

- Marcus

Peter_Cammaert
Not applicable

Re: invoke-command from Publisher

You may want to tell the Publisher that it should use ps to run this command. Add the full path to the ps executable.

Peter

Not applicable

Re: invoke-command from Publisher

Thanks! How would that path fit into the call i mentioned in my initial post ?

invoke-command -asjob -computer REMOTE_HOST -scriptblock { cscript.exe "D:\VBScripts\test_2.vbs" }

Peter_Cammaert
Not applicable

Re: invoke-command from Publisher

See the -Command option here: PowerShell.exe Command Line Help