Jump to content
Sign in to follow this  

Help with applying registry updates

Recommended Posts

Hey all,

Here is a simple script:

RegWrite ( "HKCU\Control Panel\Mouse", "SwapMouseButtons", "REG_SZ", "1" )

This is simply switching the left/right mouse buttons around for left handed users in windows 2000.

The problem Im having is Im trying to apply these changes without logging out of the workstation and back in.

Does anyone know of a way to Apply or re-read user registry settings?


Share this post

Link to post
Share on other sites

try this:

Until ProcessExists("explorer.exe") = 0


Share this post

Link to post
Share on other sites

Thanks for the suggestion! However this did not work. It does what you want it to but it does not reload the mouse changes I have may until I logout and re-login.

Any other suggestions?

Share this post

Link to post
Share on other sites



    mode = 1 for swapping
    mode = 0 for returning to normal mode

ToolTip("swapped!", 0, 0)
ToolTip("Normal!", 0, 0)

Func SwapMouseButton($mode = 1)
    DllCall("user32.dll", "int", "SwapMouseButton", "int", $mode)
EndFunc   ;==>SwapMouseButton

Func _MouseGetPrimary()
    Local $aDLLMButton = DllCall('User32.dll', 'int', 'SwapMouseButton', 'int', True)
    If IsArray($aDLLMButton) And $aDLLMButton[0] <> 0 Then Return 0
    If IsArray($aDLLMButton) And $aDLLMButton[0] = 0 Then DllCall('User32.dll', 'int', 'SwapMouseButton', 'int', False)
    Return 1
EndFunc   ;==>_MouseGetPrimary

Func _SwitchMousePrimary($nPrimary)
    Return DllCall('User32.dll', 'int', 'SwapMouseButton', 'int', $nPrimary)

So long,


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...