Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Sep 2004
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Custom .ADM - enter REG_EXPAND_SZ data - use GPO

    Hi all,

    I'm trying to change the locations of some system folders via GPO. Now GPO and the standard .adm templates don't do what I want and some do more then they should? Ex. setting 'folder redirection' for 'Start Menu' will affect Startup and Program locations as well... I found the location in the registry that I need to change ( HKCUSoftwareMicrosoftWindowsCurrentVersionExplorer User Shell Folders ) but if you just 'modify' the entry the type changes to "REG_SZ" from "REG_EXPAND_SZ". Not what I want because I need to use variables in the entry ex: %Userprofile%somedir . So I found that you need to enter the info via Binary, which isn't a problem using regedit or what have you BUT, I need to do this via. GPO. So, I wrote my own .ADM as this:

    CLASS USER

    CATEGORY !!Company_Custom_Settings

    KEYNAME "SoftwareMicrosoftWindowsCurrentVersionExplorerUse r Shell Folders"
    CATEGORY !!CustomFolders
    POLICY !!CustomFolders_Programs
    PART !!CustomFolders_ProgramsPath EDITTEXT REQUIRED
    VALUENAME "Programs"
    END PART
    END POLICY

    POLICY !!CustomFolders_Startup
    PART !!CustomFolders_StartupPath EDITTEXT REQUIRED
    VALUENAME "Startup"
    END PART
    END POLICY

    POLICY !!CustomFolders_StartMenu
    PART !!CustomFolders_StartMenuPath EDITTEXT REQUIRED
    VALUENAME "Start Menu"
    END PART
    END POLICY

    END CATEGORY; CustomFolders

    END CATEGORY

    [strings]
    Company_Custom_Settings=Company Custom Settings
    customFolders=Folder Redirect
    CustomFolders_Programs=User Program redirect
    CustomFolders_ProgramsPath=The new User Programs path location
    CustomFolders_Startup=User Startup redirect
    CustomFolders_StartupPath=The new User Startup path location
    CustomFolders_StartMenu=User Start Menu redirect
    CustomFolders_StartMenuPath=The new User Start Menu path location



    The problem is that it's the same as entering the data via 'modify' as described above, hence changing the type to "REG_SZ". Does anyone know how to enter data via and .ADM in a binary value? I've tried ( hex(2):03,42 etc ) but it just interpretes it as text...

    Please help,
    Cheers,
    ~Mike S.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Custom .ADM - enter REG_EXPAND_SZ data - use G

    Try changing EDITTEXT to EXPANDABLETEXT. Does it work?

  3. #3
    New Lounger
    Join Date
    Sep 2004
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom .ADM - enter REG_EXPAND_SZ data - use G

    pretty much [img]/forums/images/smilies/smile.gif[/img] I changed the entry via the following:
    PART !!CustomFolders_StartMenuPath EDITTEXT EXPANDABLETEXT REQUIRED
    now it's the correct format and the system can interpret/translate variables!

    Thanx for your help! Definately what I needed.
    Cheers,
    ~Mike S.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •