Is it possible to change the user account the command box server is running as? we have network shares that the server needs to be able access but currently cannot I assume because the user that process is running as does not have permission to the share.
If you have created a Windows service using a tool such as NSSM you can configure the user it runs as in the Windows service. Here’s a screen cast on that topic:
But if you’re just starting up a server from the CLI yourself, then it’s going to run under whatever user you’re logged in as. To change that, you simply need to use the “NET USE” command prior to starting up CommandBox which will change the user that the process runs as.
This worked perfectly, thank you!
Can you unpack exactly what you did for the sake of others trying to accomplish this?
Sure thing, I used NSSM to run the process as a windows service and then set the user for the windows server via command line
.\nssm install myservicename c:\mypathtotheboxexe\box.exe start myCBservername --console
.\nssm set myservicename ObjectName username password