Skip to main content
Solved

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

  • March 21, 2024
  • 5 replies
  • 186 views

psprague
Contributor
Forum|alt.badge.img+3

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"

 

Best answer by tomfriedl

"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?

View original
Did this help you find an answer to your question?

5 replies

redgeographics
Celebrity
Forum|alt.badge.img+47

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.


psprague
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • March 22, 2024

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. 


tomfriedl
Contributor
Forum|alt.badge.img+13
  • Contributor
  • Best Answer
  • March 22, 2024

"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?


psprague
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • March 22, 2024

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”😀


psprague
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • March 22, 2024

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings