Skip to main content
Question

running windows commands using systemCaller on FME Server and not sure which acct is being used

  • October 30, 2018
  • 2 replies
  • 334 views

tnarladni
Enthusiast
Forum|alt.badge.img+16

I want to set some system environment variables on my FME Server and I want to do it via a workspace so people aren't attempting to log onto the server machine to do it.

I'm using systemCaller and sending this command:

setx /m @Value(EVN_NAME) @Value(EVN_VALUE) (the attributes are from a database table)

If I'm remoting into the box, I launch the command prompt and runs the command. It's using the fire call account, but the command prompt is being run as administrator.

I added the service account that runs FME Server software to the admin group.

I can't log onto that box with the service account because it does not have logon privileges so I can't test whether or not that account can even run the command. I know it doesn't run when I run the workspace on FME Server.

Error message is: SystemCaller: Failed to Execute `setx /M KMOCShape \\\\hougisproj1\\cmproj\\gis_solutions\\projects\\KMOC\\newfolder'

Any ideas what I'm doing wrong? Thanks so much!

2 replies

Forum|alt.badge.img

Hi @tnarladni

The command in the SystemCaller in your workspace will run by the logon account that is running the FME Server Engine Service. As long as this account has privileges to run the command I would expect this to work.

I am not sure which exact permissions the setx /m command needs, but one thing you could try is to run the FME Server Engine Service with your account and see if this works.

One thing to keep in mind is that as soon as the logon account that runs the FME Server Engine Service has admin rights on the machine, potentially any workspace can carry out any tasks that require admin credentials. So depending on who has access and can publish workspaces to FME Server this approach might not be a good practice after all.


tnarladni
Enthusiast
Forum|alt.badge.img+16
  • Author
  • Enthusiast
  • November 1, 2018
gerhardatsafe wrote:

Hi @tnarladni

The command in the SystemCaller in your workspace will run by the logon account that is running the FME Server Engine Service. As long as this account has privileges to run the command I would expect this to work.

I am not sure which exact permissions the setx /m command needs, but one thing you could try is to run the FME Server Engine Service with your account and see if this works.

One thing to keep in mind is that as soon as the logon account that runs the FME Server Engine Service has admin rights on the machine, potentially any workspace can carry out any tasks that require admin credentials. So depending on who has access and can publish workspaces to FME Server this approach might not be a good practice after all.

I'm not trying to give the service account admin privileges, but I do need to add environment variables at the system level which can only be done if you run "setX /m" command. And you can only run that command if the command window is run as admin. And I only know to run cmd.exe as admin by right-clicking on the executable and specifying "run as administrator".

I can't use the "runas /user:administrator" command because it asks for the admin password which I don't have and is not required if I right-click on the executable.

Also, I have since figured out that even with admin privileges, the service account running FME engines can't run the setx /m command. The command prompt has to be run as administrator (which I don't think it meant as the administrator account).


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