Magic Jack as a service - a better way

magicJack Tips and Tricks

Moderators: Pilot, Bill Smith

semicharm
MagicJack Contributor
Posts: 67
Joined: Thu Apr 24, 2008 7:34 am

Magic Jack as a service - a better way

Post by semicharm »

UPDATE: First and foremost, MJ can update properly when running as a service, but the instructions as was provided will not work correctly. The MJ updates, just as the installer, will idiotically try to install itself into the current user's home folder. When running as a service, it is really just running under a system "user" account that has access to the system even without anyone being logged. For XP, the files should be moved to
C:\Documents and Settings\LocalService\Application Data

This only leaves the issue of the cdloader entry in the registry. It doesn't seem to cause any problems, but I'll need to test it further to be sure.

==============================

This is my first time here, though I just got through with setting up my second MJ box. After discovering the wonderful gotchas when setting up my dad's box, such as the popups and the fact that the stupid thing doesn't work if you didn't log into windows, I went the service route that others have described. Though they do work, aside from another issue that'll get into later, the other methods still have a few problems and MJ still dumps its installation in every user profile.

After conducting my own research and experimentation, I've devised another process for getting MJ to work as a service that doesn't require creating a new user or have any erroneous errors in Event Viewer.

1) Install MJ as usual.

2) Once MJ is finally at the dialpad window and working properly, open Task Manager, click the Processes tab and end the MagicJack.exe process.

3) Run MSConfig, go to the Startup tab, uncheck cdloader2.exe, then click OK.

4) Open My Computer and go to
C:\Documents and Settings\Your Username\Application Data
and move the mjusbsp folder to
C:\Documents and Settings\LocalService\Application Data
While you're in My Computer, also note the letter for second drive assigned to the MJ box. If you right click the drive and choose Properties, the correct one will have the name PHONE.

5) You can get rktools.exe to install the Windows Resource Kit, but you only really need instsrv.exe and srvany.exe.

6) Using the default path where the resource kit is installed, run cmd and enter

"C:\Program Files\Windows Resource Kits\Tools\instsrv.exe" "MagicJack" "C:\Program Files\Windows Resource Kits\Tools\srvany.exe"

If you have those two files somewhere else, just adjust the path accordingly. Make sure that there are no errors reported and close the window.

7) Run regedit and go to
HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\Services\MagicJack
Right click the MagicJack key, choose New>Key, and name it Parameters.
Now in the Parameters key, right click, choose New>String Value, and name it Application.
Double click the Application value and set it to

"C:\Documents and Settings\All Users\Application Data\mjusbsp\magicJack.exe" /scf _magicJackPersonalDataRoot "X:\magicJack"

where X is the second MagicJack drive letter you found earlier, then click OK.

That's ALL! You can either restart your computer or open the services window and start the new MagicJack service. Once MagicJack as connected, you should get a dial tone.

TROUBLESHOOTING:
If you've completed all of the steps and still can get it working, try the following:

1) Check that the MagicJack service is running. If not, try starting it.
- If it still doesn't start, make sure step 6 was completed correctly.

2) Open the Task Manager, click the Processes tab, and check if magicjack.exe is running.
- If it is, end the magicjack.exe process.

3) Edit or create a shortcut for MagicJack. Change the Target field to

"C:\Documents and Settings\All Users\Application Data\mjusbsp\magicJack.exe" /scf _magicJackPersonalDataRoot "X:\magicJack"

where X is the second MagicJack drive letter you found earlier. Change the Start in field to

"C:\Documents and Settings\All Users\Application Data\mjusbsp\"

a) If the shortcut works correctly, run regedit and go to
HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\Services\MagicJack\Parameters
and correct the value for Application. Stop the magicjack.exe process and restart the MagicJack service.

b) If it shortcut doesn't work either, make sure that the mjusbsp folder is in "C:\Documents and Settings\All Users\Application Data", that the drive letter is correct, and that everything in the shortcut was entered correctly. Note that there IS a space between "/scf" and "_magicJackPersonalDataRoot"!


NOTES:
You don't have to create a new user to run MJ as a service. Actually, you can move the mjusbsp folder just about anywhere, though you should place it somewhere in All Users or Program Files if you want Limited Users to have access to it. You don't have to name the service "MagicJack" either, but it at least should be something easy to remember. ;) Also, unlike the other "simple" method, I recommend using srvany.exe instead of magicJackLoader.exe directly, because it will start the service a LOT faster, doesn't give erroneous errors in Event Viewer, and still allows you to access the dialer window too!

If you need to access the MagicJack dialer window for any reason, just open the Services window, right click on the MagicJack service, click the Log On tab, click Allow service to interact with desktop, and click OK. Right click the MagicJack service again and choose Restart

What, no splash screen!? Using the alternate method for starting MJ rather than using magicJackLoader will not only skip the splash screen, but will stop it from needlessly installing itself in every damn user! You could also use it in a shortcut as well, in case you ever need to start it without using the service.

Overall, this method for setting MJ as a service is so simple, I probably could create a batch file to do the whole thing! If there's any request for it, I could write one when I get the time.

Shutdown issues:
Well, I said would get to it later, didn't I? Some time after I had first setup the service using the standard method on my parent's computer, it began locking up when restarting or shutting down and sure enough, disabling the service fixed the problem. There were errors in Event Viewer stating MagicJack had been accessing the registry while windows was shutting down, so I figured that I just needed to force the service to shut down when Windows shutdown. Using a shutdown script seemed to work most of the time, but sometimes it would still lockup and this time the computer would hang at the BIOS while searching for USB drives. After some research I found a small utility that can disconnect USB drives, such as MJ, from a command prompt. After adding it to the shutdown script everything works perfectly!

So if anyone else has the same problem, I detail my fix here as well. Unfortunately, it does requires using the Group Policy editor, which is missing from XP Home, so if anyone has this problem and has XP Home, let me know.

1) Download RemoveDrive and extract the files into your mjusbsp folder.

2) Run gpedit.msc, go to Computer Configuration->Windows Setting->Scripts and double click Shutdown. Click Add, then Browse. Right click in this window, choose New->Text Document. Open the file and add the following

Code: Select all

net stop MagicJack
"C:\Documents and Settings\All Users\Application Data\mjusbsp\removedrive\RemoveDrive.exe" ymax*

Save the file and close. Now right click on it and rename it some thing like shutdown magicjack.bat. This time just click the file and then click Open on this window, then click OK on the other two.

If you are still having the problem and checked that the file .bat you created is correct, then again in Group Policy editor, go to Computer Configuration->Administrative Templates->System->Scripts and double click Run shutdown scripts visible. Choose enable and click OK. When you restart your computer, a command prompt window should appear momentarily.

[EDIT 5/5: several clarifications and corrections, with addition information and advise provided by sh42n81 and Stewart.]
Last edited by semicharm on Wed Jan 21, 2009 11:29 am, edited 4 times in total.
stroths
Dan isn't smart enough to hire me
Posts: 470
Joined: Wed Apr 02, 2008 11:45 pm
Location: Dallas, TX

Post by stroths »

Thanks for the instructions. I used them to set it up as a service on my thin client and it works great. The only difference I had was that I needed to cut and paste the mjusbsp directory rather than copy and paste due to the limited space I have.
semicharm
MagicJack Contributor
Posts: 67
Joined: Thu Apr 24, 2008 7:34 am

Post by semicharm »

Actually, in step 4 I did say to move it. Drag-drop, cut-paste, etc. it's all good. I'm glad that it worked well for you to.
stroths
Dan isn't smart enough to hire me
Posts: 470
Joined: Wed Apr 02, 2008 11:45 pm
Location: Dallas, TX

Post by stroths »

My bad :)

I have run into one minor inconvenience that I only see when shutting down. I get a popup about rundll32.exe not stopping and I have to click the end task button and then it shuts down. It happens before the shutdown script has a chance to run.

Did you run into this as well?
semicharm
MagicJack Contributor
Posts: 67
Joined: Thu Apr 24, 2008 7:34 am

Post by semicharm »

Actually no, neither computer ever that problem. I'm not sure why it would cause a problem with rundll32.exe either, but the problem must be happening during the log off process, because the shutdown script won't run until after that. Do you have the same problem if you stop the magicjack service first before shutting down Windows?
sbb
MagicJack User
Posts: 33
Joined: Thu Feb 07, 2008 11:32 am

Post by sbb »

Anyone heard of FireDaemon? It is a program that will run ANY exe as a service. Their original version was free and I have it and use it to run magicJack as a service. FAR EASIER than the above instructions. Download it HERE.
gooney
Dan isn't smart enough to hire me
Posts: 382
Joined: Sat Feb 09, 2008 5:38 pm
Location: Salt Lake City, Utah

Post by gooney »

sbb wrote:Anyone heard of FireDaemon? It is a program that will run ANY exe as a service. Their original version was free and I have it and use it to run magicJack as a service. FAR EASIER than the above instructions. Download it HERE.
So how did you make magicjack run as a service with this tool? What are the steps? Did you just open firedeamon and select magicjack.exe to run as a service is all? or did you do other things like disable the cdloader or will firedeamon do that for you?
Chat with me LIVE!!! :arrow:
Image
gooney - Salt lake City, UT (801)
Don't mind me grammar cuzz it sukks!!
semicharm
MagicJack Contributor
Posts: 67
Joined: Thu Apr 24, 2008 7:34 am

Post by semicharm »

sbb wrote:Anyone heard of FireDaemon? It is a program that will run ANY exe as a service. Their original version was free and I have it and use it to run magicJack as a service. FAR EASIER than the above instructions. Download it HERE.
Well, that would only combine steps 6 & 7, as the others would still need to be done for other reasons. Having to deal with command-line tools and muck with the registry is definitely not the most elegant solution, which is par for the course with Microsoft. I must admit though that this is the first time I've ever had a need to run a standard app as a service, so I'm not well versed with all of the tools that are available.
stroths
Dan isn't smart enough to hire me
Posts: 470
Joined: Wed Apr 02, 2008 11:45 pm
Location: Dallas, TX

Post by stroths »

semicharm wrote:Actually no, neither computer ever that problem. I'm not sure why it would cause a problem with rundll32.exe either, but the problem must be happening during the log off process, because the shutdown script won't run until after that. Do you have the same problem if you stop the magicjack service first before shutting down Windows?
Disabled the service and the error went away. Its either something specific with my particular system or with the way the HP Thin client works in general. However, I did find a workaround that works for me. Setting the registry key below to enabled will make Windows behave differently on shutdown/reboot. It will force any tasks to end without asking you to end them. The change requires a reboot to take effect, but works nicely.

User Key: [HKEY_CURRENT_USER\Control Panel\Desktop]
System Key: [HKEY_USERS\.DEFAULT\Control Panel\Desktop]
Value Name: AutoEndTasks
Data Type: REG_SZ (String Value)
Value Data: (0 = disabled, 1 = enabled)


Regarding FireDaemon, I have used it before and it works well. However, for a task this simple, I would suggest following the instructions here because they work and don't require a 3rd party app to be installed.
semicharm
MagicJack Contributor
Posts: 67
Joined: Thu Apr 24, 2008 7:34 am

Post by semicharm »

Nice one! I forgot about that setting. It wouldn't have worked in my parents' case anyway.
sh42n81
MagicJack Newbie
Posts: 5
Joined: Thu Apr 17, 2008 5:22 pm

Re: Magic Jack as a service - a better way

Post by sh42n81 »

Thanks for this post. It is exactly what I'm looking for, but it didn't work for me. After following these instructions, I get a dial tone but when I place a call, just dead silence. When I try to call my magicJack line from another phone, I get "We are unable to complete your call." If I re-install magicJack as an application, everything works fine.

I am going to step through the instructions to verify for myself that I did it right and for anyone else to point out where I might have gone wrong.
semicharm wrote: 1) Install MJ as usual.
Check.
semicharm wrote: 2) Once MJ is finally at the dialpad window and working properly, open Task Manager and end the MagicJack.exe process.
Check.
semicharm wrote: 3) Run MSConfig, go to the Startup tab, uncheck cdloader2.exe, then click OK.
Check. Confirmed that this value is missing from HKCU\Software\Microsoft\Windows\CurrentVersion\Run
semicharm wrote: 4) Open My Computer and go to [font=Courier New]C:\Documents and Settings\Your Username\Application Data[/font] and move the mjusbsp folder to [font=Courier New]C:\Documents and Settings\All Users\Application Data[/font].
Check.
semicharm wrote: 5) You can get rktools.exe to install the Windows Resource Kit
Check.
semicharm wrote: 6) Run cmd and type

path\instsrv.exe "MagicJack" path\srvany.exe

where path is the path to those Resource Kit files. Make sure that there are no errors reported and close the window.
Check. In my case, "C:\Program Files\Windows Resource Kits\Tools\instsrv.exe" "MagicJack" "C:\Program Files\Windows Resource Kits\Tools\srvany.exe"

There were no errors. The MagicJack service is present and started, with startup set to Automatic. Path to executable is c:\program files\windows resource kits\tools\srvany.exe, which I infer from the instructions is proper.
semicharm wrote: 7) Run regedit and go to [font=Courier New]HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\Services\MagicJack[/font]. Right click the MagicJack key, choose New>Key, and name it Parameters.
Now in the Parameters key, right click, choose New>String Value, and name it Application.
Double click the Application value and set it to

"C:\Documents and Settings\All Users\Application Data\mjusbsp\magicJack.exe" /scf _magicJackPersonalDataRoot "X:\magicJack"

where X is the second MagicJack drive letter you found earlier, then click OK.
Check. In my case, the path for HKLM\System\CurrentControlSet\Services\MagicJack\Parameters\Application is "C:\Documents and Settings\All Users\Application Data\mjusbsp\magicJack.exe" /scf_magicJackPersonalDataRoot "F:\magicJack"

While confirming this last step , I noticed that the magicJack folder on F: was hidden. I have changed that, and I'm going to reboot to see if that fixes it.
Last edited by sh42n81 on Mon May 05, 2008 11:18 pm, edited 1 time in total.
sh42n81
MagicJack Newbie
Posts: 5
Joined: Thu Apr 17, 2008 5:22 pm

Re: Magic Jack as a service - a better way

Post by sh42n81 »

sh42n81 wrote: While confirming this last step, I noticed that the magicJack folder on F: was hidden. I have changed that, and I'm going to reboot to see if that fixes it.
No dice. Still a dial tone, but it doesn't actually work. Can anyone spot my mistake or offer a suggestion, please?
semicharm
MagicJack Contributor
Posts: 67
Joined: Thu Apr 24, 2008 7:34 am

Re: Magic Jack as a service - a better way

Post by semicharm »

sh42n81 wrote:
sh42n81 wrote: While confirming this last step, I noticed that the magicJack folder on F: was hidden. I have changed that, and I'm going to reboot to see if that fixes it.
No dice. Still a dial tone, but it doesn't actually work. Can anyone spot my mistake or offer a suggestion, please?
Sorry, I should have noticed that the magicjack folder in step 4 was actually hidden. I also copied the resource kit files from another computer and couldn't recall the default path in step 6. I'll try to correct those as soon as possible.

As for your issue, when the MagicJack service is running, is magicjack.exe running in the task manager? Unfortunately, it seems that using srvany.exe for a service doesn't actually tell you if the application it's supposed to start is running or not. If magicjack.exe isn't running, try creating a shortcut with the target set to:

"C:\Documents and Settings\All Users\Application Data\mjusbsp\magicJack.exe" /scf_magicJackPersonalDataRoot "F:\magicJack"

and Start in set to:

"C:\Documents and Settings\All Users\Application Data\mjusbsp"

If the it starts OK from the shortcut, then the registry settings for the service are wrong. You can export the MagicJack key and post it so I can take a look.
If it doesn't start from the shortcut, then some part of the path is wrong. Double check that the mjusbsp folder is in C:\Documents and Settings\All Users\Application Data and that F: is the right drive.

Well, let me know if any of this helps and we'll go from there. I had this same problem yesterday because the drive got bumped from I: to J: after installing another drive.
sh42n81
MagicJack Newbie
Posts: 5
Joined: Thu Apr 17, 2008 5:22 pm

Re: Magic Jack as a service - a better way

Post by sh42n81 »

semicharm,

Thanks. That is an excellent suggestion. I'll try it tonight when I get home and report back.
Stewart
Dan Should Pay Me
Posts: 663
Joined: Tue Nov 13, 2007 2:58 pm

Post by Stewart »

I believe that there is a typo in semicharm's post. Target should be:

Code: Select all

"C:\Documents and Settings\All Users\Application Data\mjusbsp\magicJack.exe" /scf _magicJackPersonalDataRoot "F:\magicJack"
Note the space after /scf .
semicharm
MagicJack Contributor
Posts: 67
Joined: Thu Apr 24, 2008 7:34 am

Post by semicharm »

DOH!!! I missed that too! That's probably it.
semicharm
MagicJack Contributor
Posts: 67
Joined: Thu Apr 24, 2008 7:34 am

Post by semicharm »

I've made a few clarifications and added some troubleshooting steps to my original post.
sh42n81
MagicJack Newbie
Posts: 5
Joined: Thu Apr 17, 2008 5:22 pm

Post by sh42n81 »

Yes, the space after "/scf" was the culprit. Works great now. It looks like you had it right in your original post, semicharm, and I missed it. The devil always is in the details. Thanks to you and Stewart.

BTW, I'm not sure I will ever want to, but you mentioned that this method still allows you to access the dialer window. How does that work?
semicharm
MagicJack Contributor
Posts: 67
Joined: Thu Apr 24, 2008 7:34 am

Post by semicharm »

All you really need to do to get access to MJ while it's running as a service is to set the service login to "Allow service to interact with desktop" and restart the service. MJ will start without that annoying banner, just the usual little window with the progress bar, and will run as usual. It's at least useful if you ever need to access its settings.

As for the other issue, I'm glad that you got it working. That space is annoying because one would usually expect a parameter to begin with a "/" and doubly, never expect a space before a "_".
avalien
MagicJack Newbie
Posts: 4
Joined: Tue Apr 22, 2008 11:10 am

Shutdown Fix - UPH from Microsoft

Post by avalien »

After installing MJ as service as detailed above I was able to shutdown and restart, fine. As I have this program running (UPH) as I have had issues with other software not unlocking itself from the registry.

It can be found here:
http://www.microsoft.com/downloads/deta ... laylang=en
semicharm
MagicJack Contributor
Posts: 67
Joined: Thu Apr 24, 2008 7:34 am

Post by semicharm »

That's interesting, but I've rarely had a problem with this issue as it's usually just the fault of a misbehaving program. It's good to know though that if you can't fix the program causing the problem you can at least deal with it. I'll try it on my parents' computer to see if it makes a difference.
sh42n81
MagicJack Newbie
Posts: 5
Joined: Thu Apr 17, 2008 5:22 pm

Post by sh42n81 »

semicharm wrote:That space is annoying because one would usually expect a parameter to begin with a "/" and doubly, never expect a space before a "_".
Agreed. Thanks again for this excellent thread. Now, if I could just solve that stubborn little "nobody can hear me" bugger, this thing would be good enough to replace my land line!
semicharm
MagicJack Contributor
Posts: 67
Joined: Thu Apr 24, 2008 7:34 am

Post by semicharm »

Well, having played with three of them now, the problem I kept encountering is that the volume is either too low or muted. Some programs just love to screw up these settings! Just run sndvol32 (or Start->All Programs->Accessories->Entertainment->Volume Control). Then from the menu go to Options->Properties.

A) If you're using a phone with your MJ box, for Mixer Device select USB Internet Phone by TigerJet.
Then, under Adjust volume for, click Recording. At the bottom, under Show the following volume controls, make sure that Capture is checked. Click OK.

B) If you're using not using a phone, just pick the other one under Mixer Device, which should be your sound card.
Then, under Adjust volume for, click Recording. At the bottom, under Show the following volume controls, make sure that Microphone and Line-in are checked. Click OK.

Now, just make sure that Mute isn't checked and adjust the volume level.

I know that this is a real pain in the ass. Just hope that whatever decided to screw with these settings doesn't decide to do it again. :roll:
killa
MagicJack Newbie
Posts: 1
Joined: Wed May 07, 2008 6:43 am

Yo Semi

Post by killa »

Hey Semi,

With all those mods you made I was wondering if you could help me out by explaining what the main things that the modifications are trying to change. In other words what was so annoying about the original program that you decided to go through all that trouble and guesswork to find out the nuances of manually fuxin with the windows XP registry files? Also I have a couple questions below about the modifications and also magic jack in general... if someone could answer Id greatly appreciate it-

First, with your mods in place is it true that you don't have to manually run any files to get magic jack to open and that it will automatically start on startup and run in the background thus keeping your phone line open to accept/make calls whenever your computer is turned on?

Second is it possible to use a blue tooth headset that is designed for a cell phone with magic jack? If not is there a way to modify magic jack to make it work this way?

Third does anyone have any idea about how the longevity of magic jack as a company? I don't see how they can make much of a profit charging only $20 for the USB connector and $20/year.. I mean even compared to other VOIP based communications services MJ is dirt cheap and offers the most freedom and features.

Thanks
semicharm
MagicJack Contributor
Posts: 67
Joined: Thu Apr 24, 2008 7:34 am

Re: Yo Semi

Post by semicharm »

1) Yes! That's also one of the main reasons why myself and others have bothered with all of this, and is the answer to your first question "why bother". To be more specific as to the short comings of the "out of the box" setup, MJ ONLY ran while a user is logged in. If your PC only has one user account, this isn't that big of a deal. If, however, there several users accounts, there are a few problems. The biggest one is that MJ would NOT work if the PC is just sitting at the welcome/login screen. Say, if you just turn your PC on in the morning and forget to login, your calls will still be going to voicemaill! So the main point of the "mod" is to have it running in the background all the time.

Another issue that people have complained about is the stupid splash screen that comes up and sits on top of everything else for about 30 seconds every time the program starts. Though the issue is cosmetic, it's incredibly annoying. If you've already bought the product, why do you need to have it sold to you again and again and again....?

As for having to muck with the registry, that's the drawback to using Microsoft's resource kit for the workaround. It's not an elegant solution, but it works nonetheless.

2) Funny you should mention that, I actually tried that a few days ago! It does work, but the software with my Bluetooth adapter only has handsfree support for Skype. The headset profile works, but I couldn't get it to answer calls and it stopped my headset from working with my cell phone. :x Obviously, these issues would prevent me from doing this on a regular basis, but the sound and convenience of talking without a phone were great. Just for reference, I'm using Toshiba's Bluetooth software, so you probably would have better luck with one of the others.

If you want to give it a try, first you obviously either need a PC that has Bluetooth or buy a USB adapter. I just happened to have one already that I use with my wireless headphones and PDA. If your using XP, you definitely must use the manufacturer's software, because XP's built in Bluethooth software has horrible sound support. Also, get the latest software. My adapter's CD had version 3, while Toshiba's website had version 5!

Once that's all said and done, just use the bluetooth software to "pair" the headset with your PC, which will install it as a new audio device. Then in the MJ dialer app, go to Menu->Volume/Headset Control and set the Choice your device option to Headset/Other. Bellow, set Speaker/earphone and Microphone to the device for your headset. You could set Ringing as well if you want it to ring through the headset instead of your PC's speakers.

3) I think they first released it some time last fall, but I have no idea how they're turning a profit. Also, their tech support is nearly nonexistent. There's no phone number, email, or even a mailing address. Just internet chat! At best, I think that MJ is only a cheap solution for a second line in addition to a landline or cell phone, though I've heard that they can work well with a laptop when traveling.
User avatar
Gospelific
MagicJack Newbie
Posts: 1
Joined: Wed May 07, 2008 4:07 pm

MagicJack with Vista

Post by Gospelific »

Excellent work, Semicharm. The only drag for me is that Vista (at least Vista Ultimate x32) doesn't support allowing a service to interact with the current user's desktop. I'd like it to, but whenever I need to check something out on the magicJack window I just use the shortcut from your walkthrough and then end the process when I am done checking whatever. (minor, but still sucks).

Also, anyone with Vista:

when moving the mjusbsp folder, it's location will be in:

C:\Users\YourUserName\AppData\Roaming*

Move it to:

C:\Users\Default\AppData\Roaming*

*these folders are hidden, you can unhide folders in Vista by clicking Control Panel -> Appearance and Personalization -> Show hidden files and folders

Also, when editing the registry (or the shortcut found in semicharm's troubleshooting guide), type the following:

C:\Users\Default\AppData\Roaming\mjusbsp\magicJack.exe /scf _magicJackPersonalDataRoot "X:\magicJack"

Remember the space before and after "/scf" and also remember to put the drive letter of your magicJack (the one titled PHONE in properties) where the "X" is in the above code.

Again, great information semicharm, it couldn't have been put any easier. Great Job!

Gospelific
semicharm
MagicJack Contributor
Posts: 67
Joined: Thu Apr 24, 2008 7:34 am

Post by semicharm »

Thanks Gospelific. I've never really used Vista, so I wasn't aware of the differences. I'll try to add that to my op for others when I get a chance.
hvacrepairman
MagicJack Newbie
Posts: 5
Joined: Sat Apr 26, 2008 10:43 pm

Damn thing wont go

Post by hvacrepairman »

Semicharm - I have tried your steps over and over again verifying every step. I added the space were needed. Whenever I try and start the service it errors #1053. If I create the shortcut it runs fine? Any clues? I double and trippled checked all the settings.
hvacrepairman
MagicJack Newbie
Posts: 5
Joined: Sat Apr 26, 2008 10:43 pm

Damn thing wont go

Post by hvacrepairman »

Semicharm - I have tried your steps over and over again verifying every step. I added the space were needed. Whenever I try and start the service it errors #1053. If I create the shortcut it runs fine? Any clues? I double and trippled checked all the settings.
semicharm
MagicJack Contributor
Posts: 67
Joined: Thu Apr 24, 2008 7:34 am

Post by semicharm »

Well hvacrepairman, there must be something with the service configuration or something is stopping it from starting properly. Before starting the service, make sure that magicjack.exe isn't in the processes list in the task manager. Also, check that the path to the srvany.exe file matches ImagePath value under the registry key [font=Courier New]HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\Services\MagicJack[/font]. If that checks out, just right click on the MagicJack key, choose Export, and save it to a file. Then, right click the file and choose Edit. Just copy and paste the text here and we'll take a look at it. Also include the text from the target field from the shortcut your using.

BTW, I looked up error 1053 on Microsoft's site, but it usually just means that the service is taking an unusually long time to start. :roll:
hvacrepairman
MagicJack Newbie
Posts: 5
Joined: Sat Apr 26, 2008 10:43 pm

Post by hvacrepairman »

Excuse my ignorance with all this but I dont see the srvany under services. Does this mean it did not get installed correctly?
hvacrepairman
MagicJack Newbie
Posts: 5
Joined: Sat Apr 26, 2008 10:43 pm

Post by hvacrepairman »

One thing I had a problem with was just below line 6. When I type this @ the command prompt (C:\Program Files\Windows Resource Kits\Tools\instsrv.exe" "MagicJack" "C:\Program Files\Windows Resource Kits\Tools\srvany.exe") it does not work. This is what I get. C:\Program Files\Windows Resource Kits\Tools\instsrv.exe" "MagicJack" "C:\Pr
ogram Files\Windows Resource Kits\Tools\srvany.exe"
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
semicharm
MagicJack Contributor
Posts: 67
Joined: Thu Apr 24, 2008 7:34 am

Post by semicharm »

You missed the first quote there
"[font=Courier New]C:\Program Files\Windows Resource Kits\Tools\instsrv.exe" "MagicJack" "C:\Program Files\Windows Resource Kits\Tools\srvany.exe"[/font]
Unfortunately, DOS thinks that the path ends at the first space, so you have to have it in quotes to tell it otherwise.
hvacrepairman
MagicJack Newbie
Posts: 5
Joined: Sat Apr 26, 2008 10:43 pm

Post by hvacrepairman »

That was it. Thanks a million for your time.
kharr
MagicJack Newbie
Posts: 2
Joined: Fri Apr 25, 2008 12:27 am

Post by kharr »

Thanks for the tip. It worked perfect for me!

One minor inconvenience. This hack ONLY works if MJ is installed BEFORE you boot. If I have my PC running, then decide to plug in my MJ, it tries to reinstall itself again :x

I then kill the process(s) (I think they were magicJack and magicJacksetup) to get rid of the dialpad and splash screen. Next I go into services and start magicJack. Now it's finally running in the background again.
semicharm
MagicJack Contributor
Posts: 67
Joined: Thu Apr 24, 2008 7:34 am

Post by semicharm »

Well, you could use Tweak UI to disable the auto run on the MJ drives and then setup a shortcut to run [font=Courier New]net start "MagicJack"[/font] to start the service.
norml jack
Dan isn't smart enough to hire me
Posts: 115
Joined: Mon Jan 07, 2008 7:08 pm
Location: Humboldt County, Ca.
Contact:

Re: Magic Jack as a service - a better way

Post by norml jack »

semicharm wrote:This is my first time here, though I just got through with setting up my second MJ box. After discovering the wonderful gotchas when setting up my dad's box, such as the popups and the fact that the stupid thing doesn't work if you didn't log into windows, I went the service route that others have described. Though they do work, aside from another issue that'll get into later, the other methods still have a few problems and MJ still dumps its installation in every user profile.

After conducting my own research and experimentation, I've devised another process for getting MJ to work as a service that doesn't require creating a new user or have any erroneous errors in Event Viewer.

1) Install MJ as usual.

2) Once MJ is finally at the dialpad window and working properly, open Task Manager, click the Processes tab and end the MagicJack.exe process.

3) Run MSConfig, go to the Startup tab, uncheck cdloader2.exe, then click OK.

4) Open My Computer and go to [font=Courier New]C:\Documents and Settings\Your Username\Application Data[/font] and move the mjusbsp folder to [font=Courier New]C:\Documents and Settings\All Users\Application Data[/font]. While you're in My Computer, also note the letter for second drive assigned to the MJ box. If you right click the drive and choose Properties, the correct one will have the name PHONE.

5) You can get rktools.exe to install the Windows Resource Kit, but you only really need instsrv.exe and srvany.exe.

6) Using the default path where the resource kit is installed, run cmd and enter

"C:\Program Files\Windows Resource Kits\Tools\instsrv.exe" "MagicJack" "C:\Program Files\Windows Resource Kits\Tools\srvany.exe"

If you have those two files somewhere else, just adjust the path accordingly. Make sure that there are no errors reported and close the window.

7) Run regedit and go to [font=Courier New]HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\Services\MagicJack[/font]. Right click the MagicJack key, choose New>Key, and name it Parameters.
Now in the Parameters key, right click, choose New>String Value, and name it Application.
Double click the Application value and set it to

"C:\Documents and Settings\All Users\Application Data\mjusbsp\magicJack.exe" /scf _magicJackPersonalDataRoot "X:\magicJack"

where X is the second MagicJack drive letter you found earlier, then click OK.

That's ALL! You can either restart your computer or open the services window and start the new MagicJack service. Once MagicJack as connected, you should get a dial tone.

TROUBLESHOOTING:
If you've completed all of the steps and still can get it working, try the following:

1) Check that the MagicJack service is running. If not, try starting it.
- If it still doesn't start, make sure step 6 was completed correctly.

2) Open the Task Manager, click the Processes tab, and check if magicjack.exe is running.
- If it is, end the magicjack.exe process.

3) Edit or create a shortcut for MagicJack. Change the Target field to

"C:\Documents and Settings\All Users\Application Data\mjusbsp\magicJack.exe" /scf _magicJackPersonalDataRoot "X:\magicJack"

where X is the second MagicJack drive letter you found earlier. Change the Start in field to

"C:\Documents and Settings\All Users\Application Data\mjusbsp"

a) If the shortcut works correctly, run regedit and go to [font=Courier New]HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\Services\MagicJack\Parameters[/font] and correct the value for Application. Stop the magicjack.exe process and restart the MagicJack service.

b) If it shortcut doesn't work either, make sure that the mjusbsp folder is in "C:\Documents and Settings\All Users\Application Data", that the drive letter is correct, and that everything in the shortcut was entered correctly. Note that there IS a space between "/scf" and "_magicJackPersonalDataRoot"!


NOTES:
You don't have to create a new user to run MJ as a service. Actually, you can move the mjusbsp folder just about anywhere, though you should place it somewhere in All Users or Program Files if you want Limited Users to have access to it. You don't have to name the service "MagicJack" either, but it at least should be something easy to remember. ;) Also, unlike the other "simple" method, I recommend using srvany.exe instead of magicJackLoader.exe directly, because it will start the service a LOT faster, doesn't give erroneous errors in Event Viewer, and still allows you to access the dialer window too!

If you need to access the MagicJack dialer window for any reason, just open the Services window, right click on the MagicJack service, click the Log On tab, click Allow service to interact with desktop, and click OK. Right click the MagicJack service again and choose Restart

What, no splash screen!? Using the alternate method for starting MJ rather than using magicJackLoader will not only skip the splash screen, but will stop it from needlessly installing itself in every damn user! You could also use it in a shortcut as well, in case you ever need to start it without using the service.

Overall, this method for setting MJ as a service is so simple, I probably could create a batch file to do the whole thing! If there's any request for it, I could write one when I get the time.

Shutdown issues:
Well, I said would get to it later, didn't I? Some time after I had first setup the service using the standard method on my parent's computer, it began locking up when restarting or shutting down and sure enough, disabling the service fixed the problem. There were errors in Event Viewer stating MagicJack had been accessing the registry while windows was shutting down, so I figured that I just needed to force the service to shut down when Windows shutdown. Using a shutdown script seemed to work most of the time, but sometimes it would still lockup and this time the computer would hang at the BIOS while searching for USB drives. After some research I found a small utility that can disconnect USB drives, such as MJ, from a command prompt. After adding it to the shutdown script everything works perfectly!

So if anyone else has the same problem, I detail my fix here as well. Unfortunately, it does requires using the Group Policy editor, which is missing from XP Home, so if anyone has this problem and has XP Home, let me know.

1) Download RemoveDrive and extract the files into your mjusbsp folder.

2) Run gpedit.msc, go to [font=Courier New]Computer Configuration->Windows Setting->Scripts[/font] and double click Shutdown. Click Add, then Browse. Right click in this window, choose New->Text Document. Open the file and add the following

Code: Select all

net stop MagicJack
"C:\Documents and Settings\All Users\Application Data\mjusbsp\removedrive\RemoveDrive.exe" ymax*

Save the file and close. Now right click on it and rename it some thing like [font=Courier New]shutdown magicjack.bat[/font]. This time just click the file and then click Open on this window, then click OK on the other two.

If you are still having the problem and checked that the file .bat you created is correct, then again in Group Policy editor, go to [font=Courier New]Computer Configuration->Administrative Templates->System->Scripts[/font] and double click Run shutdown scripts visible. Choose enable and click OK. When you restart your computer, a command prompt window should appear momentarily.

[EDIT 5/5: several clarifications and corrections, with addition information and advise provided by sh42n81 and Stewart.]
Your "better way" is convoluted and about as clear as mud. The Frank Zappa Procedure not only works extremely well, but provides a platform for allowing maximum security and control as well as the initial setup for running multiple MJ devices, and all of them as services. Before publishing "A better way" it is best that you have some understanding of just what it is you are accomplishing consistent with best practices. A mentally retarded child can come up with a better mud pie. Here is the original Frank Zappa Procedure as written in the old forum, thanks again Frank:

Download from Microsoft rktools.exe. Extract this file; you will need the following two programs: srvany.exe; and instsrv.exe. READ THE INSTRUCTIONS on how these programs are used. Create a user named "magicjack", temporarily assign admin privilege. Login as “magicjack”, and install the magicjack under this profile. Install the service using the instructions you READ, and then add parameter magicjackloader.exe as the target of srvany.exe.

The following is a registry script:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\magicJack]
"Type"=dword:00000010
"Start"=dword:00000002
"ErrorControl"=dword:00000001
"ImagePath"=hex(2):63,00,3a,00,5c,00,77,00,69,00,6e,00,64,00,6f,00,77,00,73,00,\
5c,00,73,00,72,00,76,00,61,00,6e,00,79,00,2e,00,65,00,78,00,65,00,00,00
"DisplayName"="magicJack"
"ObjectName"=".\\magicjack"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\magicJack\Enum]
"0"="Root\\LEGACY_LINE1\\0000"
"Count"=dword:00000001
"NextInstance"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\magicJack\Parameters]
"Application"="c:\\Documents and Settings\\magicjack\\Application Data\\mjusbsp\\magicjackloader.exe"

Reduce the “magicjack” user privilege to "user".

If you can read, follow instructions, and have at least two brain cells to rub together, then you will end up with an MJ that runs anytime the computer is on without regard to whoever is or is not logged in.
semicharm
MagicJack Contributor
Posts: 67
Joined: Thu Apr 24, 2008 7:34 am

Post by semicharm »

Yes, I used that method first and had several issues with it, but calling my method "convoluted" is just plan silly as most of the steps are the same because both use srvany.exe to run the service. Also, creating another user is a waste of time and running the service that way restricts what you can do with it. As for running multiple boxes on one PC, no one is saying that you can't use magicjackloader.exe instead, I just prefer not to.

BTW, since you're obviously able to comprehend english and have no problems figuring out how to setup a service, then why are you the only one that has difficulty understanding the steps that I'd outlined? Also, if you can only relate to others via insults such as "mentally retarded child", then I really feel sorry for you. While I would welcome addressing real issues in a rational manner, just spouting off and ranting insults belittles your intelligence and is a waste of time.
norml jack
Dan isn't smart enough to hire me
Posts: 115
Joined: Mon Jan 07, 2008 7:08 pm
Location: Humboldt County, Ca.
Contact:

Post by norml jack »

semicharm wrote:Yes, I used that method first and had several issues with it, but calling my method "convoluted" is just plan silly as most of the steps are the same because both use srvany.exe to run the service. Also, creating another user is a waste of time and running the service that way restricts what you can do with it. As for running multiple boxes on one PC, no one is saying that you can't use magicjackloader.exe instead, I just prefer not to.

BTW, since you're obviously able to comprehend english and have no problems figuring out how to setup a service, then why are you the only one that has difficulty understanding the steps that I'd outlined? Also, if you can only relate to others via insults such as "mentally retarded child", then I really feel sorry for you. While I would welcome addressing real issues in a rational manner, just spouting off and ranting insults belittles your intelligence and is a waste of time.
I couldn't have said it better myself. LOL
Bendle
Dan isn't smart enough to hire me
Posts: 103
Joined: Thu Mar 27, 2008 5:14 pm
Location: proxy1.nashville.talk4free.com

Post by Bendle »

norml jack wrote:
semicharm wrote:Yes, I used that method first and had several issues with it, but calling my method "convoluted" is just plan silly as most of the steps are the same because both use srvany.exe to run the service. Also, creating another user is a waste of time and running the service that way restricts what you can do with it. As for running multiple boxes on one PC, no one is saying that you can't use magicjackloader.exe instead, I just prefer not to.

BTW, since you're obviously able to comprehend english and have no problems figuring out how to setup a service, then why are you the only one that has difficulty understanding the steps that I'd outlined? Also, if you can only relate to others via insults such as "mentally retarded child", then I really feel sorry for you. While I would welcome addressing real issues in a rational manner, just spouting off and ranting insults belittles your intelligence and is a waste of time.
I couldn't have said it better myself.
Am I confused or do we have a case of MPD going on here?
:?:

And lastly, why is this thread even a sticky? We already have a sticky for run as service (which is where this thread should have been started anyway)...

Oh well.
Last edited by Bendle on Thu May 15, 2008 1:00 am, edited 1 time in total.
norml jack
Dan isn't smart enough to hire me
Posts: 115
Joined: Mon Jan 07, 2008 7:08 pm
Location: Humboldt County, Ca.
Contact:

Post by norml jack »

Bendle wrote:Am I confused or do we have a case of MPD going on here?
:?:

And lastly, why is this thread even a sticky? We already have a sticky for run as service (which is where this thread should have been started anyway)...

Oh well.
Confusion and MPD can be from the same organic cause. Have you discussed this with your primary care physician? You should request a referral to a specialist that may provide the help you need.
Bendle
Dan isn't smart enough to hire me
Posts: 103
Joined: Thu Mar 27, 2008 5:14 pm
Location: proxy1.nashville.talk4free.com

Post by Bendle »

norml jack wrote:
Bendle wrote:Am I confused or do we have a case of MPD going on here?
:?:

And lastly, why is this thread even a sticky? We already have a sticky for run as service (which is where this thread should have been started anyway)...

Oh well.
Confusion and MPD can be from the same organic cause. Have you discussed this with your primary care physician? You should request a referral to a specialist that may provide the help you need.
I prefer to self-medicate. I can say with envy that we are not from the same "organic cause" regretfully. :cry:
norml jack
Dan isn't smart enough to hire me
Posts: 115
Joined: Mon Jan 07, 2008 7:08 pm
Location: Humboldt County, Ca.
Contact:

Post by norml jack »

Bendle wrote:I prefer to self-medicate. I can say with envy that we are not from the same "organic cause" regretfully. :cry:
Well, come on up to Humboldt County, we specialize in self-medication. We have meds legal in Humboldt County, State of California that most doctors can't prescribe.
semicharm
MagicJack Contributor
Posts: 67
Joined: Thu Apr 24, 2008 7:34 am

Post by semicharm »

Bendle wrote:And lastly, why is this thread even a sticky? We already have a sticky for run as service (which is where this thread should have been started anyway)...
You'd have to ask the mods why this thread is a sticky. If you guys want to quibble, do it somewhere else.
norml jack
Dan isn't smart enough to hire me
Posts: 115
Joined: Mon Jan 07, 2008 7:08 pm
Location: Humboldt County, Ca.
Contact:

Post by norml jack »

semicharm wrote:You'd have to ask the mods why this thread is a sticky. If you guys want to quibble, do it somewhere else.
Now the lil' punk thinks he's in charge. LOL
semicharm
MagicJack Contributor
Posts: 67
Joined: Thu Apr 24, 2008 7:34 am

Post by semicharm »

The "Tips, Tricks, and Hacks" forum isn't for idle chat genius.
norml jack
Dan isn't smart enough to hire me
Posts: 115
Joined: Mon Jan 07, 2008 7:08 pm
Location: Humboldt County, Ca.
Contact:

Post by norml jack »

semicharm wrote:The "Tips, Tricks, and Hacks" forum isn't for idle chat genius.
I agree, this forum should not be used for idle chat genius, or any other genius.
WIN_55,212-2 My new best friend on the recreational playground. It's a gas!
anirbansen
MagicJack Newbie
Posts: 5
Joined: Sun May 11, 2008 6:11 pm
Location: Alexandria, VA

Self-reinstalling?

Post by anirbansen »

I got magicJack to work as a service pretty well. The problem is when my brother removed magicJack while it was running as a service. When he plugged it back in a few seconds later (15-25 sec.), magicJack reinstalled the software like the first time.

How to avoid this?
stroths
Dan isn't smart enough to hire me
Posts: 470
Joined: Wed Apr 02, 2008 11:45 pm
Location: Dallas, TX

Re: Self-reinstalling?

Post by stroths »

anirbansen wrote:I got magicJack to work as a service pretty well. The problem is when my brother removed magicJack while it was running as a service. When he plugged it back in a few seconds later (15-25 sec.), magicJack reinstalled the software like the first time.

How to avoid this?
Disable autorun

# Run the Registry Editor (REGEDIT.EXE).
# Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Cdrom.
# Double-click the Autorun value, and type 0 for its value. (If it's not there, create it by selecting Edit -> New -> DWORD Value, and typing "Autorun" for its name.)
# You may have to log out and then log back in for this change to take effect.
anirbansen
MagicJack Newbie
Posts: 5
Joined: Sun May 11, 2008 6:11 pm
Location: Alexandria, VA

Re: Self-reinstalling?

Post by anirbansen »

[quote="stroths"][quote="anirbansen"]I got magicJack to work as a service pretty well. The problem is when my brother removed magicJack while it was running as a service. When he plugged it back in a few seconds later (15-25 sec.), magicJack reinstalled the software like the first time.

How to avoid this?[/quote]

Disable autorun

# Run the Registry Editor (REGEDIT.EXE).
# Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Cdrom.
# Double-click the Autorun value, and type 0 for its value. (If it's not there, create it by selecting Edit -> New -> DWORD Value, and typing "Autorun" for its name.)
# You may have to log out and then log back in for this change to take effect.[/quote]

Thanks! But this would be a global setting. Any way to specify the X: drive? (where X = the magicJack Phone drive)
Post Reply