Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Member
Posts: 12
Registered: ‎08-10-2016
Accepted Solution

Script error - Permissions?

[ Edited ]

Hi

 

I have a vbs-script i'd like to call with the external node. This script connects to a mysql database + writes to a csv (max-file), but when using it thorugh FreeFlow Core, it errors. It doesn't in a cmd-window.

 

I'm guessing it's due to permissions, though FreeFlow core doenst really tell me what errored. How are the scipts called from FreeFlow Core? Do i need to adjust something? Change "log on as" on the services? folder permissions? something? :-) 

 

In scheduled tasks, i know that some people launch scripts through a .bat containing "cscript.exe somescript.vbs", to overcome issues, but i havn't managed to get this fix to work either.

New Member
Posts: 5
Registered: ‎08-26-2015

Re: Script error - Permissions -> start with simple *.bat

You should start with a simple *.bat script like this (it works here):

 

echo off
REM logging.bat RM mit P1=Step-Bezeichnung P2=Auftragsnummer P3=FFC-Zeit P4=FFC-FFin
REM Zeitstempel in Log schreiben
echo Auftrag %2 Stufe %1 fertig >>%2.log
time <enter.txt >>%2.log
REM echo FFC-Zeit %3 >>%2.log
echo FFC-FFin %4 >>%2.log

 

From the view of FFC (Workfloweinrichtung):

Art = Script

Script = D:\Hotfolders_Test\dz_opti_steps\bat\logging.bat

Parameter = "Schritt" "$FFwfJob.Id$" "$FFtimeStamp$" "$FFin$" "$FFout$"

 

Result: D:\Hotfolders_Test\dz_opti_steps\bat\FFCnumber.log - files were written

 

Good luck Robert M. from Germany

Member
Posts: 12
Registered: ‎08-10-2016

Re: Script error - Permissions?

If i check the MantisDebug.log, i see this " The specified executable is not a valid application for this OS platform. "

 

No support for vbscript?

Member
Posts: 12
Registered: ‎08-10-2016

Re: Script error - Permissions -> start with simple *.bat

[ Edited ]

Thanks rm59 - i'll try batch-files again :-)

 

edit:

Yours doesnt call a script, it seems, but maybe if i fiddle some more, i can get it to work.

 

Member
Posts: 12
Registered: ‎08-10-2016

Re: Script error - Permissions -> start with simple *.bat

Nope. No workie!

 

Still need help :-)

FreeFlow Production Workflow Moderator
Posts: 2,298
Registered: ‎01-03-2012

Re: Script error - Permissions -> start with simple *.bat

[ Edited ]

This should work. However, you have to point to cscript.exe in the Script field.

The vbs file and other information should be in the parameters field.

 

FFCore will concatenate both fields. The result of that concatenation should look like this: cscript [script name] [host options] [script arguments]

 

https://technet.microsoft.com/en-us/library/bb490816.aspx

Member
Posts: 12
Registered: ‎08-10-2016

Re: Script error - Permissions -> start with simple *.bat

Woa, that worked!

 

Thank you!

 

screenshot.png

New Member
Posts: 5
Registered: ‎08-26-2015

Re: Script error - Permissions -> start with simple *.bat

Hi to you,

 nice to read, that my example helped to find out:

  division of script's primary name and all following values as parameter(s) (bracked by ") into parameter field.

Bye Robert from Germany