we run staf as services on our testbed, then met below issue. But if run staf not as service, not occur below issue.
dataview_path = 'c:/Program Files (x86)/Reuters/DataView/DataView.exe'
cmd_parms = '/TRWF2 /IM 220.127.116.11 /PM 22222 /IH 192.168.27.142 /L 260 /R F.N /REF /IFMS 18.104.22.168 /PFMS 25000 /FEED SI3 /D MARKET_PRICE'
req_str = 'START COMMAND %s PAMRS %s' % (STAFUtil.wrapData(dataview_path), STAFUtil.wrapData(cmd_parms))
handle.submit2(IP, "process", req_str)
when we run req_str this command, return RC=1 error, but if we start staf not as service, the command can execute sucessfully.
Because this command related to soap msg, and i don't think whether there are some connection with this??
thanks in advance.
When configuring STAFProc to run as a service did you follow the instructions in section "11. Starting STAFProc during system reboot", sub-section "11.3 Windows" in the STAF Installation Guide at http://staf.sourceforge.net/current/STAFInstall.pdf, particularly step 10:
10. From the 'Log On' tab, click 'Allow service to interact with desktop', then click on Apply and then click on OK.
This could account for the difference in behavior.
What version of Windows are you using where this problem occurs? Note that Windows 2008 (and later) no longer supports services inteacting with the user desktop for security reasons. See http://technet.microsoft.com/en-us/library/cc756339(WS.10).aspx.
we use windows 2008, is there any other method to solve this problem, and we need staf run as service.
sorry, windows server 2008. you mean for windows server 2008, we should manually click "allow service to interact with desktop"?
I don't know if your "DataView.exe" executable requires interaction with the desktop. If it does, then it may not be possible to run it with STAFProc configured to run as a service due to the limitation in Windows that is talked about in the link I gave. You could try configuring STAFProc with and without the "Allow service to interact with desktop" selected and see if it works. Otherwise, you may have to ask Microsoft this question.