Set up Windows environment with python

Jim mrmaple at gmail.com
Thu Sep 29 16:00:58 CEST 2005


My company resells windows machines, and we install our software, and
do a bunch of customization to make sure that all the desktop settings
are optimal...  we adjust the screen resolution, color depth, and
referesh rate,  remove shadows from menus and the mouse pointer, set
the power management options, disable the screensaver, etc... (very
long list)

I've started doing most of what I want with ctypes:

def disableShadows():
    # constants taken from WinUser.h in the PlatformSDK
    SPI_SETCURSORSHADOW = 0x101B
    rv =
ctypes.windll.user32.SystemParametersInfoA(SPI_SETCURSORSHADOW, 0,
False, win32con.SPIF_SENDWININICHANGE)

    # remove shadows from menus
    SPI_SETDROPSHADOW = 0x1025
    rv = ctypes.windll.user32.SystemParametersInfoA(SPI_SETDROPSHADOW,
0, False, win32con.SPIF_SENDWININICHANGE)

But I'm finding that none of the changes seem to be permanent.  I'm
wondering if I need to start changing the current Explorer theme
information instead, or go right to the registry and start changing
values.

Desktop wallpaper changes work, but they aren't permanent... rebooting
restores the previous desktop wallpaper.

Does anyone have any experience with this sort of system preperation
scripting?

Thanks,
-Jim




More information about the Python-list mailing list