magicJack and MagicJack Plus Support, Reviews, FAQs and Hacks Forum Index magicJack and MagicJack Plus Support, Reviews, FAQs and Hacks
magicJack and magicJack Plus Unofficial Technical Support. Your Magic Jack and Magic Jack Plus phone service information resource
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Magic Jack as a service - a better way
Goto page 1, 2, 3 ... 15, 16, 17  Next
 
Post new topic   Reply to topic    magicJack and MagicJack Plus Support, Reviews, FAQs and Hacks Forum Index -> magicJack Tips, Tricks, and Hacks
View previous topic :: View next topic  
Author Message
semicharm
MagicJack Contributor


Joined: 24 Apr 2008
Posts: 67

PostPosted: Thu May 01, 2008 4:48 pm    Post subject: Magic Jack as a service - a better way Reply with quote

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. Wink 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:

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
Back to top
View user's profile Send private message
Google
AdSense





PostPosted: Thu May 01, 2008 4:48 pm    Post subject: Magicjack support, tips, tricks, and hacks

Back to top
stroths
Dan isn't smart enough to hire me


Joined: 02 Apr 2008
Posts: 470
Location: Dallas, TX

PostPosted: Fri May 02, 2008 7:04 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
semicharm
MagicJack Contributor


Joined: 24 Apr 2008
Posts: 67

PostPosted: Fri May 02, 2008 7:30 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
stroths
Dan isn't smart enough to hire me


Joined: 02 Apr 2008
Posts: 470
Location: Dallas, TX

PostPosted: Fri May 02, 2008 1:03 pm    Post subject: Reply with quote

My bad Smile

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?
Back to top
View user's profile Send private message
semicharm
MagicJack Contributor


Joined: 24 Apr 2008
Posts: 67

PostPosted: Fri May 02, 2008 7:14 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
sbb
MagicJack User


Joined: 07 Feb 2008
Posts: 33

PostPosted: Fri May 02, 2008 11:33 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
gooney
Dan isn't smart enough to hire me


Joined: 09 Feb 2008
Posts: 382
Location: Salt Lake City, Utah

PostPosted: Sat May 03, 2008 12:09 am    Post subject: Reply with quote

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

gooney - Salt lake City, UT (801)
Don't mind me grammar cuzz it sukks!!
Back to top
View user's profile Send private message
semicharm
MagicJack Contributor


Joined: 24 Apr 2008
Posts: 67

PostPosted: Sat May 03, 2008 5:05 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
stroths
Dan isn't smart enough to hire me


Joined: 02 Apr 2008
Posts: 470
Location: Dallas, TX

PostPosted: Sat May 03, 2008 9:32 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
semicharm
MagicJack Contributor


Joined: 24 Apr 2008
Posts: 67

PostPosted: Sat May 03, 2008 1:54 pm    Post subject: Reply with quote

Nice one! I forgot about that setting. It wouldn't have worked in my parents' case anyway.
Back to top
View user's profile Send private message
sh42n81
MagicJack Newbie


Joined: 17 Apr 2008
Posts: 5

PostPosted: Sun May 04, 2008 2:06 pm    Post subject: Re: Magic Jack as a service - a better way Reply with quote

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:a7402fa9ab]C:\Documents and Settings\Your Username\Application Data[/font:a7402fa9ab] and move the mjusbsp folder to [font=Courier New:a7402fa9ab]C:\Documents and Settings\All Users\Application Data[/font:a7402fa9ab].

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:a7402fa9ab]HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\Services\MagicJack[/font:a7402fa9ab]. 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
Back to top
View user's profile Send private message
sh42n81
MagicJack Newbie


Joined: 17 Apr 2008
Posts: 5

PostPosted: Sun May 04, 2008 2:11 pm    Post subject: Re: Magic Jack as a service - a better way Reply with quote

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?
Back to top
View user's profile Send private message
semicharm
MagicJack Contributor


Joined: 24 Apr 2008
Posts: 67

PostPosted: Sun May 04, 2008 10:27 pm    Post subject: Re: Magic Jack as a service - a better way Reply with quote

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.
Back to top
View user's profile Send private message
sh42n81
MagicJack Newbie


Joined: 17 Apr 2008
Posts: 5

PostPosted: Mon May 05, 2008 9:49 am    Post subject: Re: Magic Jack as a service - a better way Reply with quote

semicharm,

Thanks. That is an excellent suggestion. I'll try it tonight when I get home and report back.
Back to top
View user's profile Send private message
Stewart
Dan Should Pay Me


Joined: 13 Nov 2007
Posts: 663

PostPosted: Mon May 05, 2008 10:34 am    Post subject: Reply with quote

I believe that there is a typo in semicharm's post. Target should be:
Code:
"C:\Documents and Settings\All Users\Application Data\mjusbsp\magicJack.exe" /scf _magicJackPersonalDataRoot "F:\magicJack"
Note the space after /scf .
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    magicJack and MagicJack Plus Support, Reviews, FAQs and Hacks Forum Index -> magicJack Tips, Tricks, and Hacks All times are GMT - 4 Hours
Goto page 1, 2, 3 ... 15, 16, 17  Next
Page 1 of 17

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB Turbo Extended Edition © 2013, phpBB Group
magicJack and magicJack Plus are trademarks of magicJack LLP. This website is in no way affiliated, endorsed, or sponsored by magicJack LLP, and is an unofficial forum for consumers to openly communicate regarding their experiences with the magicJack products.