INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: MC11: library server as WinNT service  (Read 2664 times)

shAf

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 863
MC11: library server as WinNT service
« on: June 19, 2005, 03:24:19 pm »

I searched this topic but found generally references too old for anyone to be comfortable with trying.  Can someone bring this topic up to date with a how to response?

tia  :)
Logged
cheerios from the Avalon Peninsula, Newfoundland

AnalogRoaming

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 89
Re: MC11: library server as WinNT service
« Reply #1 on: June 20, 2005, 01:04:35 pm »

On Win NT, it's going to be tough. On 2000 or XP or 2003, you can use the SC command at the prompt to make any .bat or .exe run as a service. Play around with that.
Logged
Me fail english? That's unpossible!

paulr

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 527
  • nothing more to say...
Re: MC11: library server as WinNT service
« Reply #2 on: June 20, 2005, 01:22:48 pm »

You can use the instsrv.exe and srvany.exe programs from the resource kit (on your CD, or download from Microsoft) to do this.

See http://support.microsoft.com/kb/q137890/ for details on how to do it, or Google "srvany.exe" for many examples of doing this.

I have not tried this with MC, but it *should* work.  If you want to be able to open the interface, make sure you select "Interact with desktop" for the service under the Services section of Computer Management.
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: MC11: library server as WinNT service
« Reply #3 on: June 20, 2005, 01:23:52 pm »

Here is a solution: http://codeproject.com/system/xyntservice.asp

After you have once configured Library Server in MC you can use this command line for running only the server part of MC:

C:\Windows\system32\MC11.exe /MediaServer

(replace C:\Windows with your OS path)
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

paulr

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 527
  • nothing more to say...
Re: MC11: library server as WinNT service
« Reply #4 on: June 20, 2005, 01:34:14 pm »

Here is a solution: http://codeproject.com/system/xyntservice.asp

After you have once configured Library Server in MC you can use this command line for running only the server part of MC:

C:\Windows\system32\MC11.exe /MediaServer

(replace C:\Windows with your OS path)

That's really neat!  Much easier and more flexible than the srvany method.  I'm definitely going to play around with this.  Thanks for the info!
Logged

shAf

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 863
Re: MC11: library server as WinNT service
« Reply #5 on: June 25, 2005, 03:45:43 pm »

Thanx all for the tips!  (sorry to confuse ... WinNT versus Win2k/WinXp ... the concept of services is the same ... I am using WinXP for the host computer)

What are the issues regarding the variety of logons to the host, and the variety of users using MC, possibly modifying the library while the MC server is running as a service?  That is, the reason I wanted it running as a service is because I expect a variety of users, and I didn't want to specify MC start up for everyone.

tia  :o)
Logged
cheerios from the Avalon Peninsula, Newfoundland

Robert Taylor

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 646
  • Living in a Smokeless Zone...
Re: MC11: library server as WinNT service
« Reply #6 on: June 26, 2005, 03:06:06 am »

Just a small point about using XYNTService to startup Media Server.

You have to make sure you change the installed service logon account to the account which your Media Center library lives under.

If you don't do this, when Media Center (Server) starts up, it prompts to import files for the non-existant library of the default system user of the service.

As long as you do this, it works fine.

Here is the INI file I used to startup MC11 Media Server as a service using XYNTService:
Quote
[Settings]
ServiceName = Media Server
ProcCount = 1
CheckProcess = 1
[Process0]
CommandLine = C:\WINDOWS\system32\MC11.exe /MediaServer
WorkingDir = C:\WINDOWS\System32
PauseStart = 1000
PauseEnd = 1000
UserInterface = Yes
Restart = No


Once you have the INI file sorted, just issue the XYNTService.exe -i command to install the service. To remove it, use XYNTService.exe -u

Logged
Cheers
Rob

zxsix

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1753
Re: MC11: library server as WinNT service
« Reply #7 on: July 06, 2005, 01:42:32 am »

Having some issues running MC11.exe as a service.

Background:
Server is Windows 2000.
Command line used to run as a service = d:\windows\system32\mc11.exe /MediaServer.
Changed login of service to the admin username that I log into the desktop with.
Tested with  MC 11.0.302 and 11.0.305


Problem Summary:
1) Playcounts are not being updated when clients play songs (when /Mediaserver is running as service).
2) Can't start MC program when /Mediaserver is running as a service.

-------------------------------------------------------------------------------------------------
Details:
1a) Start regular MC on server (not service, just the normal icon).
    Start MC on client.
    Play a song from the client.
    Close MC on client.
    Note that playcount on that song on server is now increased from 0 to 1.
    Works as it should.

1b) Start MC as a service using XYNTservice.exe or Firedaemon.  I tried both.
   Start MC on client.
   Play a song.
   Close MC on client.
   Noted that playcount on that song on server is still not showing any count.
   Playcount and lastplayed information were not updated.

----------------------------------------------------------------------------------------------------
2a) Start MC as service on server.
    Start MC on client.
    Noted that it connects to server and plays song.
    Close MC on client.
    Note on server's task manager that Media Center.ex is showing as a running process.
    Click on shortcut to start MC.
    Nothing happens on the screen.
    Note on server's task manager that the original Media Center.ex is still showing, but there is also an additional Media Center.ex and MC11.exe process showing.
   After a few seconds, those 2 new processes disappear.

I can't run MC11.exe /Mediaserver as a service and also run the normal MC front end at the same time on the server.

Is it absolutely necessary to stop the service, run MC so I can edit the database and import songs, then remember to restart the service in order to get this working right?

Logged

Bill Kearney

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 373
Re: MC11: library server as WinNT service
« Reply #8 on: July 06, 2005, 06:39:21 am »

IIRC, mc11 can't run as a service in the classic sense.  That is, there's not a headless version of it that will also support a full UI client.  Each MC11 instance 'stands alone' from the others.  They can play from each other's databases but not act as clients from a shared database.   It would be nice to see future versions have this ability but it's not part of MC11.
Logged

zxsix

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1753
Re: MC11: library server as WinNT service
« Reply #9 on: July 06, 2005, 08:23:28 am »

Here's another scenario.

Start up MC using normal shortcut.
Play a song, edit some things in the database.
Everything works.

Now, click on Tools>Advanced Tools>Media Server.
The little icon appears in the system tray now.
Now, click on File>Exit to close MC.
The Media Server icon is still showing in the tray.
Clients can connect and play from the library.
Now click the normal icon for MC to start up MC again.
It works and I now have the Media Server and MC running at the same time.

Doing the same scenario with Media Server running as a service does not allow MC to start up .


What does seem to work is this scenario:
No MC service running.
Start up MC with normal shortcut.
While that copy of MC is running, start MC as service.
Close original copy of MC.
Wait a bit.
Reopen MC with normal shortcut.
That works.

However, not sure if that's gonna fly after a reboot and the service is already started automatically.  Will have to test some more after work.


Logged

shAf

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 863
Re: MC11: library server as WinNT service
« Reply #10 on: November 20, 2005, 07:57:04 am »

IIRC, mc11 can't run as a service in the classic sense.  That is, there's not a headless version of it that will also support a full UI client.  [...]   It would be nice to see future versions have this ability but it's not part of MC11.

Any thoughts for making Windows classic service an option for the library Server in MC11.1??
Logged
cheerios from the Avalon Peninsula, Newfoundland
Pages: [1]   Go Up