I don't use a script for this. I just call it a "program" and point it to the FileMaker file I want to launch. Seems to work okay.
This does not seem to work on W2102 R2
I get "is not a valid Win 32 application"
You did say you were doing this on a client, so I assumed that you were using a client robot, not a server. We've traditionally done it on everything from Windows 95 up through Windows 7.
Can't speak to the server OS. But my understanding was you needed an actual client for this operation. Is FileMaker Pro / Advanced installed?
".exe file with an argument."
FileMaker Pro.exe and your filename to open.
I didn't test but explorer.exe and URL using fmp: may be work.
"Aslo the FMS 13 admin interface for ths looks weird -- not much space to add the script info?"
You don't have any script in script folder, so dropdown has minimum width.
You can write .bat or .vbs script to open the file.
I am actually running the client copy of FMP13 on the same machine as the server.
What string should be in the .bat file?
Depending on your installation.
Use full path and quote with "" for spaces.
"C:\Program Files (x86)\FileMaker\FileMaker Pro 13\FileMaker Pro.exe" "E:\Local_FM_Files\reports.fmp12"
I have done exactly that saving the string as one line in a .bat file
It does not work:
"schedule aborted. print.bat could not be found or is invalid."
OS is Windows 2012 R2 Server Se
Ah Wim, thanks.
I got that far actually but I could still use some help
I have a file "absorb.bat"
In contains the string "E:\Local_FM_Files\reports.fmp12"
I am logged as Administrator and if I right click on th .bat file and select "Run as administrator" everthing works - the startup script has "exit application" at the end so FMP quits after running also.
If I enter that string at the command prompt it works too.
If I schedule it using FMS 13 using the system it does not run!
If I set it to the Administrator account I get a log entry
Schedule "..." aborted; "absorb.bat" could not be found or is invalid.
If I leave it to the System account I see a log entry
Schedule "..." aborted; system script "absorb.bat" returned non-zero status -1.
Running it from the Windows task scheduler does not work either
This is W12012 R2
FMP has a full ActiveX interface that you can use from VBscript to:
- launch FMP
- open a file
- run a targeted script
- close a file
- close FMP
All the while letting you error trap and make decisions on exceptions. That's a much better approach than brute-forcing a file open.
After making sure all FMP prcess were not running using Task manager. the job starts form FMS using th system account and I see no error but nothing actually happens (FMP DOES Launch in background though) and FMP stays open
that seems the classy way to go
I will look into that
OK its working --almost
Here is my script
Set objFM = WScript.CreateObject ("FMPRO.Application") 'create FM object
If objFM.ScriptStatus = 0 then 'test if a script is currently running
Set objFMfiles = objFM.Documents.Open("E:\Local_FM_Files\reports.fmp12","hostscript","sfp4321") 'open FM file
objFM.Visible = True ' make sure FM is visable
objFMfiles.DoFMScript ("print") 'preforms a FM script
But when I double click the vbs file I see this after FMP opens
I have FMP and FMPA installed -- could that cause this?