?
Solved

Custom .ADM - entering REG_EXPAND_SZ data into registry - Binary data using GPO?

Posted on 2004-09-24
1
Medium Priority
?
2,590 Views
Last Modified: 2012-06-27
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 ( HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\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 "Software\Microsoft\Windows\CurrentVersion\Explorer\User 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.
0
Comment
Question by:siegi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 85

Accepted Solution

by:
oBdA earned 2000 total points
ID: 12151118
No need to use binary data. Define the Edittext as Expandabletext, and it should create the correct type:

PART !!CustomFolders_StartMenuPath EDITTEXT EXPANDABLETEXT REQUIRED

Administrative Template File Format
http://msdn.microsoft.com/library/en-us/policy/policy/administrative_template_file_format.asp
0

Featured Post

10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This may not be a text book method to resolve VSS backup issues but it seemed to have worked on few of the Windows 2003 servers we had issues while performing a Volume Shadow Copy backup. If you have issues while performing a shadow copy backup usin…
I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question