|
From: Leif M. <le...@ta...> - 2004-07-19 10:58:22
|
Ted, Ted Hudacko wrote: >That is an excellent hypothesis. I experimented with an even simpler >version of the VB script that, rather than opening Excel, simply created a >new text file in the root directory. E.g.: > > Set objFS = CreateObject( "Scripting.FileSystem" ) > objFS.CreateTextFile "C:\foobar.txt" > >This works fine in both console and service modes, and with the service >running either as LocalSystem or Administrator (the account I normally log >in as). > >Unfortunately, when I substitute the commands to open Excel back into the VB >script, Excel does not open. Same result happens if the script is changed >to simply display a message box: > > MsgBox foo > >So it does indeed appear that the issue is interactivity with the desktop by >the service wrapper under certain user identities. > > Ok, so is sounding more like that might what your problem is. When you run as the default SYSTEM user, with wrapper.ntservice.interactive set, you are not seeing anything come up? I would have thought that would have made any dialogs visible. I have noticed that when using remote terminal to connect to a system, it does not seem possible to use interactive services. ie, they never show up on these remote connections. Not sure the details behind this, but I have noticed at a customer site. Also note the issue with pre 1.4.0 JVMs described here: http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-interactive.html I am not sure if this also pertains to their child processes. >>What happens if you run the Wrapper as the user you are normally logged >>in as? You can >>do this using the wrapper.ntservice.account / wrapper.ntservice.password >>properties. Let >>me know whether or not it works when running as you. If so then we can >>proceed with >>trying to figure out how to get it running as the SYSTEM user. >> >> > >I uninstalled, then reinstalled the JBoss service, making sure that I had >the following properties set in the wrapper.conf: > wrapper.ntservice.adviser=true > wrapper.ntservice.account=.\Administrator > wrapper.ntservice.password=mypassword > wrapper.ntservice.interactive=true > >However, the following warning appears: > wrapper | Ignoring the wrapper.ntservice.interactive property because it >can not be set when wrapper.ntservice.account is also set. > >Checking your source code, this string appears in >wrapperBuildNTServiceInfo() > Wrapper_3.1.0_src\src\c\wrapper.c > >Here, you force the interactive property to FALSE when both flags are set in >wrapper.conf. Not being familiar with your code, it's unclear in what >context this is called. Is this called every time the wrapper runs, or just >when you install the wrapper as a service? > > This is an issue with the underlying Windows API. The service manager only allows you to set a service as being interactive if and only if you are using the SYSTEM user. Other users are not allowed to interact with the desktop. I added code to the Wrapper to detect this case and display an error message rather than simply having it not work when the service was run. >The Windows Services GUI does not permit you to set "Allow service to >interact with desktop" for accounts other than Local System account. This >article suggests a hack to the Registry entry for that service: > http://www.dotnet247.com/247reference/msgs/33/166835.aspx > > Reading this, I am not sure that it would correct the problem and make non-system users able to interact with the desktop. Even for Windows, I would be surprised if it was that easy considering they have gone out of their way to disallow you the ability to set it in the service control panel. The only time the Wrapper makes use of the wrapper.ntservice.interactive property is when the service is being installed. Once a service has been installed, it does not have the ability to control this in its own process. >I tried setting this bit for the JBoss service after installing with >InstallJBoss-NT.bat But this still didn't work as desired. > > When using the Administrator account, do you still need to be able to interact with the desktop? If you can get the Wrapper and your application working in console mode when logged in as the Administrator, then I would expect it to work exactly the same when running as a service. Cheers, Leif |