 |
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
|
View previous topic :: View next topic |
Author |
Message |
tomcom MagicJack Newbie
Joined: 26 Apr 2011 Posts: 9
|
Posted: 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 |
|
 |
|
|
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
|
|