Share Your Entire Desktop Using Live Mesh
November 9, 2009 – 3:37 pm | One Comment

If your like me and you work on multiple computers then the idea of cloud computing makes a lot of sense. There are multiple solutions out there both free and commercial but one that caught …

Read the full story »
Online Gaming

All about online gaming focusing mainly on First Person Shooters on the PC platform. Consoles may get a mention also but PCZFTW

Game Programming

If its making mods using scripting languages like Unrealscript or dealing with SDK’s like DirectX using C++ it’s in here.

Dot NET

Focusing on the Windows .NET platform. Programming in C# using Visual Studio.

General Computing

Everything got to do with using computers. Whether its Windows, Linux, Mac or other flavour its in here.

Computer Hardware

Graphics Cards, CPU’s, Memory and everything else got to do with building your own PC and modding your existing ones.

Home » Dot NET, Featured, Headline

How-To Start iTunes as a Windows service

Submitted by ClearZ on October 1, 2009 – 6:57 am10 Comments

Update 28/11/09

Download the application from here
http://www.johncleary.net/2009/11/download-jtunes-here/

I recently got around to getting an iPhone 3GS which hasn’t left my hand since. Being a gadget freak I cannot help but be in awe at the amount of technology packed into this device. This is not my first iPhone either. I got a first generation one sent over from America about two years ago as they were unavailable here at the time. I had the thing for less than two months before it got robbed on me. I only have myself to blame anyway because I spent most of Saturday nights running around bars and night clubs showing the thing to anybody that would care to give me five minutes of their time.

Remote iPhone App

Remote iPhone App

After playing around on the AppStore for a while I discovered a charming little free application named simply ‘Remote’. Once installed it lets you use your iPhone as a remote control for iTunes over your WiFi network. What’s more, you can also store multiple profiles on it which for someone like me who has access three PC’s and a laptop at home it’s a great feature. I could now take my music with me as I moved around the house controlling what music played from each computer all from my phone, but I had to be logged-on on each machine with iTunes running in order for this to work. This wouldn’t always be the case as there are other people who use the computers also or I simply may not be logged-on. It didn’t take long for me to start thinking how this setup could be improved on.

The one solution that came to mind was to somehow get iTunes to run as a Windows Service, so I started Visual Studio and Googled  ‘C# Windows Service’.  After a bit of reading I started on my App. I would need to develop a service that would run under my account and not the LocalSystem or LocalService accounts that a service will use by default. This was fine on my computer which is running Windows 7 Ultimate RC and other PC’s running Vista Ultimate as I can give my account the ‘Logon as Service’ privilege by simply opening the Local Security Policy editor, but the laptop runs Vista Home Premium which doesn’t have such easy access to the Local Security Policy. I finally found a simple little program on the net that allowed me to give the ‘Logon as Service’ privilege to users on non ‘Ultimate’ machines called NTRights.

I now can play music on any computer in my house with any user logged in or even if no one is logged-on and all this from my iPhone. The only problem is now when I try to start iTunes in the normal way it fails because it is running already as a background process so I have to stop and then restart the service while doing things like syncing my ipod. I am currently rewriting the app with a nice user (noob) friendly GUI instead of its current form being a bunch of console programs and batch scripts. I will release it here once it gets completed.

Popularity: 36% [?]

10 Comments »

  • Tom says:

    When is the release date?

  • Howard says:

    Looking forward to this, I’ve been wanting to do it a while in our shared house but I’m too lazy.

  • James says:

    Hi

    This errors for me when installing the service, running Windows 7 Home. Any ideas please? Log below:

    ************** Exception Text **************
    System.IO.IOException: The request is not supported.

    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.File.Encrypt(String path)
    at JTunesService.LoginDetails.SaveDetails(String Username, String ComputerName, String Password)
    at JTunesService.Form1.installBtn_Click(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

  • Amy says:

    When is the release date?

  • Sara says:

    Looking forward to this, I’ve been wanting to do it a while in our shared house but I’m too lazy.
    +1

  • ClearZ says:

    It is released. Just follow the link at the bottom of the article.

  • James says:

    Still no suggestions for the above error I posted please?

  • ClearZ says:

    James, I have updated the app so that you should not get that error any more. Try re-downloading the new version and give that a go.

  • Eivind says:

    I love this tool/application/service. Thanks John!

    If you’re taking donations, where can I contribute?

  • $author Thanks for a wonderful post. Can not wait to come back and read more on your blog. Have a great day.

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.

Code*: