David
Fri Jul 16 11:24:34 CDT 2004
Thanks for the input. I tried that and it doesnt seem to work either. I
ensured that the syntax was correct and launched notepad to ensure the shell
was working... still no update to the mouse sensativity until a reboot. Any
other ideas?
Set WSHShell = WScript.CreateObject("WScript.Shell")
RegKey = "HKEY_CURRENT_USER\Control Panel\Mouse\MouseSensitivity"
WSHShell.RegWrite RegKey,"20","REG_SZ"
WSHShell.Run "%windir%\System32\RUNDLL32.EXE
user32.dll,UpdatePerUserSystemParameters",1, True
WScript.Quit
"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:umYkqazaEHA.3480@TK2MSFTNGP11.phx.gbl...
> David Doumani wrote:
>
> > I am trying to use the following script to adjust the mouse
sensativity - we
> > want to include this on the desktop of all the laptops in the org so
while
> > attached to the dockingstation w/ a external mouse the mouse sensativity
is
> > 20 - and when on the road a simple click will turn it down to 1, making
the
> > mouse pointer easier to control..
> >
> > Using regmon the only key that needs to be changed is MouseSensitivity;
and
> > doing it via the cpl applet changes the key and immediatly adjusts the
> > sensativity.
> >
> > I wrote the following script and it does change the key but a reboot is
> > required to commit the change - can someone point me in the direction
that
> > will make the setting take effect when set in the script?
> >
> >
> >
> > Set WSHShell = WScript.CreateObject("WScript.Shell")
> > RegKey = "HKEY_CURRENT_USER\Control Panel\Mouse\MouseSensitivity"
> > WSHShell.RegWrite RegKey,"1","REG_SZ"
>
>
> For Win2k and WinXP, this might work:
>
> WSHShell.Run _
> "%windir%\System32\RUNDLL32.EXE
user32.dll,UpdatePerUserSystemParameters", _
> 1, True
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
>
http://www.microsoft.com/technet/community/scriptcenter/default.mspx