Running Windows Services
Running Windows Services
Im trying to run a windows service application with wine (downloaded with apt on Debian 4.0, I believe its 1.0.1).
The application can install itself by typing "wine app.exe -install". This will return a successfull message saying that the app is installed as a service.
When I try to start (wine net start app) the service it says that its already running, which is not.
I've looked in the documentation/wiki/forum but haven't found anything that describing how to start/stop a service etc.
Am I doing it the right way? Any tip would be helpful!
/ E
The application can install itself by typing "wine app.exe -install". This will return a successfull message saying that the app is installed as a service.
When I try to start (wine net start app) the service it says that its already running, which is not.
I've looked in the documentation/wiki/forum but haven't found anything that describing how to start/stop a service etc.
Am I doing it the right way? Any tip would be helpful!
/ E
Re: Running Windows Services
Yes. Use 'ps x' to verify if it's running or not. Also try with newer Wine version.duja wrote:Am I doing it the right way?
Running Windows Services
On Thu, 2009-03-19 at 09:50 -0500, duja wrote:
ps -u user
shows all processes for 'user', and
ps -ef
shows all processes on the computer. I find
ps -ef | grep progname
a useful command. It lists all processes and filters that list with grep
to show onlt the process(es) you're interested in. It produces one or
more lines. One is the grep process itself and the others are the
processes you wanted to know about. If you use it a lot, write a small
script:
========start of filterps script file =========
#!/bin/bash
ps -ef | grep $1
========end of filterps script file =========
Put it in the search path and make it executable:
cp filterps /usr/local/bin
chmod uga+rx filterps
and to run it:
filterps app
/usr/local/bin is usually your the search path.
Martin
Yes, if you're logged in as the same user.Should I see it running as a seperate app like if I start my service named "app" should I then see app.exe in the "ps x" -list?
ps -u user
shows all processes for 'user', and
ps -ef
shows all processes on the computer. I find
ps -ef | grep progname
a useful command. It lists all processes and filters that list with grep
to show onlt the process(es) you're interested in. It produces one or
more lines. One is the grep process itself and the others are the
processes you wanted to know about. If you use it a lot, write a small
script:
========start of filterps script file =========
#!/bin/bash
ps -ef | grep $1
========end of filterps script file =========
Put it in the search path and make it executable:
cp filterps /usr/local/bin
chmod uga+rx filterps
and to run it:
filterps app
/usr/local/bin is usually your the search path.
Martin
Yes, as well as few Wine own processes (explorer.exe, wineserver, etc).duja wrote:Should I see it running as a seperate app like if I start my service named "app" should I then see app.exe in the "ps x" -list?
The only way for now is to look under this registry key:duja wrote:EDIT: Is there anyway in wine to see all the installed services?
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services]
Some entries are not services however but just some registry data. You should for entries with "DisplayName".
Thanks for the answers 
Here's what I've done.
I looked in [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services] and did see that the service is installed.
When I try to start the service with the following:
and when I look in the ps list I cant find it, obviously its NOT started :/
I can run my app in console mode but I really need it as a service.
Any ideas?

Here's what I've done.
I looked in [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services] and did see that the service is installed.
When I try to start the service with the following:
Code: Select all
user@computer03:~/.wine/drive_c/$ wine net start App
The App service is starting.
Service already running
- user 4146 1 0 09:09 ? 00:00:01 /home/user/.wine/drive_c/windows/regedit.exe
user 4151 1 0 09:09 ? 00:00:01 /usr/lib/wine/wineserver
user 4154 1 0 09:09 ? 00:00:00 C:\windows\system32\services.exe
user 4158 4154 0 09:09 ? 00:00:00 C:\windows\system32\winedevice.exe MountMgr
user 4166 1 0 09:09 ? 00:00:00 C:\windows\system32\explorer.exe /desktop
root 4288 2845 0 09:15 ? 00:00:00 [bandwidthd] <defunct>
root 4337 2844 0 09:18 ? 00:00:00 [bandwidthd] <defunct>
user 4340 3746 0 09:20 pts/0 00:00:00 ps -ef
Code: Select all
user@computer03:~/.wine/drive_c/Program Files/user/Monitor$ wine net stop App
The App service is stopping.
fixme:service:EnumDependentServicesA 0x11a5b8 0x00000001 (nil) 0x00000000 0x33ee08 0x33ee04 - stub
Invalid service control
Any ideas?
Its designed to run as a service and has features that uses the Service-ability. I could run it in console-mode but that would force us to change the application design. It would be smooth to have the same application on windows and linux and not change the application code/design.
But it seems that running it as a service is a bit tricky, it doesn't just run :/
Fyi,
this is what I get when installing the service:
fixme:advapi:DeregisterEventSource (0xcafe4242) stub
although it installs ok.
It also looks like that the first time when I do net start I get a access denied like this:
Any ideas on what could cause this behaviour?
But it seems that running it as a service is a bit tricky, it doesn't just run :/
Fyi,
this is what I get when installing the service:
fixme:advapi:DeregisterEventSource (0xcafe4242) stub
although it installs ok.
It also looks like that the first time when I do net start I get a access denied like this:
Code: Select all
$ wine net start App
The App service is starting.
Access denied
Running Windows Services
On Mon, Mar 23, 2009 at 9:07 AM, vitamin <[email protected]> wrote:
program running.
--
-Austin
To avoid that, run 'wine notepad' or 'wine winemine' to keep a smallduja wrote:It tells me the service started successfully. However keep in mind Wine will kill all services if there are no other apps left running.$ wine net start App
The App service is starting.
program running.
--
-Austin
Running Windows Services
On Fri, Mar 27, 2009 at 3:40 AM, duja <[email protected]> wrote:
--
-Austin
Wine isn't a complete OS. It's a compatibility layer to run your applications.Btw, why does wine kill the service if no wine app is running? Shouldnät a service run in the background like in Windows?
--
-Austin