Question
· Apr 24, 2017

How to change the user of the $ZF user

Hi I've created a word macro in order to convert doc to txt via the command line, this works fine via the command line by myself or another user but when I try as an the intersystems user which runs under  LocalSystem it doesn't work. 

So can I change the user, or set the $ZF to run as a different user?

Or do I have to try another way to convert doc to txt - it's looking like libreOffice?

I just wanted to stick with word because I could be guaranteed on the result being accurate.

Thanks

Regards

Richard

Discussion (11)2
Log in or sign up to continue

Your reference to LocalSystem means I assume you're running Cache on Windows. On this platform Cache processes started by Cache (e.g. telnet logins, web application handlers, Studio connections) will run at the OS level as whatever Windows account the Cache service is set to log on as (see Windows service control manager tab as shown below).

If you make your Cache service run as a specific account rather than as Local System, then all of the processes started by Cache will run with those credentials.

I don't know if this will help you.

UPDATE: Starting at 2015.2 (I think), it is important to use the cinstall.exe utility (located in your installation's bin subdirectory) to change which account the service runs as:

cinstall setserviceusername <InstanceName> <username> <password>

If you don't do this but instead only  change the setting in the Log On tab of the service (screenshot above), then in certain circumstances the $ZF() functions may return a -1 failure code. See http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=... Search the docs for "setserviceusername" for more details.

Hello John,

I'm trying to get more information about a similar $ZF issue, and running the caché instance as a Windows user rather than Local SYSTEM.  I have this link from IS to help me out: 

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GCRNA_C157184

 

But I was hoping to get a little bit more info from the link you sent out; unfortunately the link gives me a "missing" error.  Do you think you can find that link again?

 

This is my issue: after we upgraded from 2014 to 2016, the ability to use call out (such as w $zf(-1,"dir *.*") ) is gone.  IS recommended using the cinstall command, as noted above, but it's not working.  I'm asking IS about it now... We run our instances under a particular user, not as local system.

I can update this thread with the solution.

Thanks,

Laura Cavanaugh

Hi, Richard.

...to have cache run as a different user to access that macro...

Running Caché for Windows using a dedicated user account (so called service account) may have some other advantages:

  • Caché processes get ability to use MS network resources (shared folders), e.g. Caché Backup can be performed directly to remote folder; 
  • Kerberos authentication can be used.

So long story short just going down the libre office route.

Why do you expect that libre office route would be shorter? Do you plan to use another (not $zf(-1,...)) approach?

Running Caché for Windows using a dedicated user account (so called service account) may have some other advantages:
Mmmm maybe - but given that it wasn't an option on install it's not something that our Server Guys want to do and I don't blame them really. Just seems like it could lead to places that we don't want to be.

Why do you expect that libre office route would be shorter? Do you plan to use another (not $zf(-1,...)) approach?
Yeah still using $ZF but instead of using word and a macro to do the conversation just use libreOffice. It can do the conversation straight out of the box (after little play with the command line options). I just wanted to use Word because I thought it would be more reliable but it was just turning into a nightmare to get working.

Thanks for your quick response it's nice to know I have a place to go when I get stuck.

Having said that it's getting a bit ridiculous, install word with a macro and then to have cache run as a different user to access that macro (which might have all manner of issues).

So long story short just going down the libre office route.

Thanks though for the advice and your answer.

Richard

Running Caché for Windows using a dedicated user account (so called service account) may have some other advantages:
Mmmm maybe - but given that it wasn't an option on install it's not something that our Server Guys want to do and I don't blame them really. Just seems like it could lead to places that we don't want to be.

Why do you expect that libre office route would be shorter? Do you plan to use another (not $zf(-1,...)) approach?
Yeah still using $ZF but instead of using word and a macro to do the conversation just use libreOffice. It can do the conversation straight out of the box (after little play with the command line options). I just wanted to use Word because I thought it would be more reliable but it was just turning into a nightmare to get working.