Jump to content

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?

Thanks

Link to comment
Share on other sites

try this:

ProcessClose("explorer.exe")
Do
    Sleep(1000)
Until ProcessExists("explorer.exe") = 0
Run("explorer.exe")

Arjan

Link to comment
Share on other sites

HI,

try:

#cs
    mode = 1 for swapping
    mode = 0 for returning to normal mode
#ce

SwapMouseButton()
ToolTip("swapped!", 0, 0)
Sleep(5000)
SwapMouseButton(0)
ToolTip("Normal!", 0, 0)

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

_SwitchMousePrimary(_MouseGetPrimary())
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)
EndFunc

So long,

Mega

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...