Solved

command line with parameters only works with the cmd window running as administrator

  • 21 March 2024
  • 5 replies
  • 60 views

Badge +1

I am running a workbench that uses dates as parameters. If I run the command in a windows cmd window without admin privilege's, the date parameters are not passed into the workbench. When I run the cmd window with admin privilege's it work as expected.  I am fairly new to FME and I am not sure what I am missing. Any insights are appreciated.  

string passed to the cmd window:

"C:\Program Files\ArcGIS\Data Interoperability for ArcGIS Pro\fme.exe" \\myserver\myworkbench.fmw --SourceDataset" --SourceDataset" --SourceDataset" --DestDataset_CSV2" \\myserver\myfolder\mycsv" --odbc2_where_clause "(reptd >= '2024-2-1 00:00:00' AND reptd < '2024-3-1 00:00:00 00:00:00')"  --FME_LAUNCH_VIEWER_APP" YES"

 

icon

Best answer by tomfriedl 22 March 2024, 12:08

View original

5 replies

Userlevel 5
Badge +26

Is it just the data parameters that are not being passed on or is there more that’s not working? E.g. if your non-admin account doesn’t have access to those network folders it’s not going to work either.

Badge +1

It is just the parameters, The script runs fine, but it maintains the parameters that are set as the default in the workbench instead of using the parameters I’m passing to it through the command line. 

Userlevel 2
Badge +12

"C:\Program Files\ArcGIS\Data Interoperability for ArcGIS Pro\fme.exe" \\myserver\myworkbench.fmw

--SourceDataset"

--SourceDataset"

--SourceDataset"

--DestDataset_CSV2" \\myserver\myfolder\mycsv"

--odbc2_where_clause "(reptd >= '2024-2-1 00:00:00' AND reptd < '2024-3-1 00:00:00 00:00:00')"  

--FME_LAUNCH_VIEWER_APP" YES"

That’s your params? Three times SourceDataset? No format?

Badge +1

That stuck out to me as well, I do not know why it’s generating the 3 sources when I ran the workbench, I deleted the one source that I had disabled. I noticed that when run it from within the work bench the first time, I am prompted for the SQL query, but when I run it a second time it does not prompt me. All which does not explain why if I run it from the cmd window with admin privileges it accepts the parameters with no problems. I’m thinking I might right a new one from scratch. It’s the classic scenario of “I knew it was running fine back in January”😀

Badge +1

Thank you, Tom, I am parsing a bad execution string from the program I am writing it from. 

Reply