PerliKnight has asked for the wisdom of the Perl Monks concerning the following question:

Happy New Year,
Can someone suggest how to write a very short Perl script that does the equivalent of choosing a directory->properties->general->enable thumbnail view????
This is on NT where we have some 3000 PCs to do this to and I'm sure we must be able to script this so any pointers (or solutions!) much appreciated.
Many thanks, David

Replies are listed 'Best First'.
Re: Enabling thumbnail views?
by b10m (Vicar) on Jan 07, 2004 at 15:44 UTC

    I don't see why you want to use perl for this when you have "regedt32" (or something that looks like that ... it's been a while). See for example this article on the issue. I don't have any Windows machine over here, so I can't test anything, but do remember that a ".reg" file is easilly created and executed.

    Besides that, you must have a policy/solution for updating your clients already, for I don't believe you run around updating 3000 PC manually. I bet there's a tool you use already to edit certain registry keys. Just hack these edits in there :)

    Update: Ermm, please excuse my ignorance for believing MS would store such parameters in the infamous registry. It seems like you need to hack the desktop,ini file in each directoryfolder, which, of course could be done with Perl. Or just copy a "right" desktop.ini to all the "folders" on your clients that need updating (which is probably faster and doesn't require Perl on all the 3000 machines)

    --
    b10m
Re: Enabling thumbnail views?
by flyingmoose (Priest) on Jan 07, 2004 at 15:57 UTC
    I would first start to find out how Windows saves this data internally. Hopefully, this is accessible via the registry. Then, use the appropriate Win32 Registry module to edit that registry.

    Of course, you still have issues to deal with, such as how you decide to run the script on 3000 PC's...but that's easy enough with a login batch script (or equivalent) and running Perl over the network. UPDATE: Yep, the above post is right. Desktop.ini. I should have known that! I congratulate Microsponge for not using the registry in one place. The days of ini files were so much more fun (and reasonable).

      Thanks guys.
      I'll give that a birl.
      Cheers, David