|
From: Leif M. <le...@ta...> - 2006-02-28 01:13:44
|
Anil, You aren't going to like my answer. Windows places restrictions on what a service is allowed to do. By default, the wrapper runs using a SYSTEM user. This user is fairly powerful within the current machine. But it is not allowed to access network files or printers. It is however, allowed to become interactive and thus access the desktop. http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-interactive.html In order to be able to access the network as a service, you need to configure a specific account to run the service as. That account is set up to be able to access the network devices you want to access before the service is started. http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-account.html http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-password.html Unfortunately, if you have configured a non-SYSTEM account to run the service as, it is no longer possible for your service to interact with the desktop. This means that your service is able to access network drives OR display a GUI, but not both. This is a restriction placed on the service API by the Windows OS. It doesn't make a whole lot of sense why the interactive feature would be disabled. At least not if the logged in user is the same as the service user. I have not yet figured out a way to work around this other than to break out the network or GUI features into a second service and then run them both. Most non-java services seem to handle this by having a service which is installed and always running. Then they register another non-service application to start when a user logs in. This second app creates a tray icon and or displays the GUI while the service does much of the work behind the scenes. If you or anyone else has any other ideas on how to solve this, it would be a great improvement. Also if you have examples of other services where this is possible, it may give me hints on how to get working. As far as I know though, it isn't possible. Cheers, Leif Anil N. Juthani wrote: > Hi, > I am launching an application using the JSW and everything seems to be > working fine. However, once the GUI is launched for my application, when I > use the Java 'file browser' and try to navigate to a folder on the > 'network', I am unable to do so. > If I launch the application from the JSW console, I am able to navigate to > the 'network' drive, but the same through for the application through the > windows nt service, it is unable to point to any network drive. > Suggestion/ solutions would be welcome... > Thanks, > ---- Anil > |