Unofficial magicJack Forum

Unofficial magicJack Forum

Your Unofficial magicJack and magicJack 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 
Annoying MagicJack Desktop Shortcut Icon

 
Post new topic   Reply to topic    Unofficial magicJack Forum -> magicJack Tips, Tricks, and Hacks
View previous topic :: View next topic  
Author Message
tomcom
MagicJack Newbie


Joined: 26 Apr 2011
Posts: 9

PostPosted: Tue Apr 26, 2011 2:58 pm    Post subject: Annoying MagicJack Desktop Shortcut Icon

I found the creation of a desktop shortcut icon each time I launched MagicJack to be annoying so I developed the following Powershell script
and created a shortcut to it, which I placed in my Startup folder. This causes the script to be invoked at every boot. The script starts MagicJack and deletes the desktop shortcut icon.

#Powershell script code starts here:
#The following system variable ceases the display of error messages in the Powershell window
$ErrorActionPreference = "SilentlyContinue"

# The following variable contains your Windows UAC name
$UAC_Name = $env:username

# The following variable contains the name of the MagicJack process
$ProcessName = "MagicJack"

# The following variable contains the path to the MagicJack executable(usually MagicJack.exe)
$ProcessToStart = "c:\users\" + $UAC_Name + "\appdata\roaming\mjusbsp\magicjack.exe"

# The following variable contains the path to the desktop shortcut which may be used to invoke the MagicJack executable
$MJShortCut = "c:\users\" + $UAC_Name + "\desktop\magicjack.lnk"

# The following stops the MagicJack process if it is active/running
if(get-process $ProcessName) {stop-process -name $ProcessName -force}

# The following launches the MagicJack executable
while (get-process $ProcessName) {continue}
start-process -filepath $ProcessToStart

# The following loop waits for the launch of the MagicJack executable to complete
while(-not(get-process $ProcessName)) {continue}

# The following removes the MagicJack desktop shortcut
remove-item $MJShortCut
#Powershell script code ends here

If you want to use this script:
- open Notepad
- copy the above script code and paste it into Notepad
- save the script to c:\windows\syswow64\windowspowershell\v1.0 with an extension of .ps1(Example: Start MagicJack.ps1)
- create a shortcut to the script and place it in your Windows Startup folder

Note:

I am running Windows 7 Home Premium (64bit) - Powershell v2.0(this is included with this Windows version)
This script may not run or may have to be modified to run on other versions of Windows or Powershell
Versions of Windows prior to XP SP3 do not generally include or support Powershell
Check the following Registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine
to determine your version of Powershell
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Unofficial magicJack Forum -> magicJack Tips, Tricks, and Hacks All times are GMT - 4 Hours
Page 1 of 1

 
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 Ultra Turbo Extended Edition Live © 2001-9999, 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.