Hack100.Disable the Skype API


Hack 100. Disable the Skype API

Perhaps corporate policy dictates it, or perhaps you just think it's a good idea. In any event, disabling Skype's API on Windows requires only a single registry setting.

Works with: Windows version of Skype.

With the release of version 1.4 for Windows, Skype included the ability to disable its API. In many businesses, disabling this function may be dictated by corporate policy, or it might be at the request of your network administrator or IT security officer. Provided you're willing to hack the Windows registry, you can selectively disable Skype's API.

Open Regedit (select Start Run…, enter "Regedit," and press Return or click OK) and add this key: HKEY_LOCAL_MACHINE\Software\Policies\Skype\Phone. Under this key, add a new DWORD value having the name DisableApi. Setting DisableApi to 1 will disable the Skype API, and setting it to 0 (or omitting or deleting the key altogether) will leave the API enabled. Note that you have to stop and restart Skype for this change to take effect. Also, toggling this registry entry between 0 and 1 does not delete Skypes add-on control list, as that is unaffected; instead, the Skype API simply stops receiving and sending messages.

Of course, this hack works sensibly only when regular user accounts are set up so that they can't edit the registry under HKEY_LOCAL_MACHINE themselves; that is, specifically, they should not be able to change DisableApi.

12.11.1. Hacking the Hack

If you don't want to hack this registry setting yourself, or if you have to roll out Skype across a large number of machines, you might find the following VBScript (disable_api.vbs) helpful:

 ' File: disable_api.vbs Dim objShell Set objShell = WScript.CreateObject("WScript.Shell") objShell.RegWrite "HKLM\Software\Policies\Skype\Phone\DisableApi", _                    1, "REG_DWORD" 

Here is the opposite (enable_api.vbs), just in case the policy prohibiting use of the Skype API changes:

 ' File: enable_api.vbs Dim objShell Set objShell = WScript.CreateObject("WScript.Shell") objShell.RegWrite "HKLM\Software\Policies\Skype\Phone\DisableApi", _                     0, "REG_DWORD" 

Note that both scripts will, if necessary, create the registry entry if it does not exist already.




Skype Hacks
Skype Hacks: Tips & Tools for Cheap, Fun, Innovative Phone Service
ISBN: 0596101899
EAN: 2147483647
Year: 2005
Pages: 168

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net