ADMX file specify REG_EXPAND_SZ

Hello,

I am having trouble specifying a registry string type as REG_EXPAND_SZ in an ADMX template.  The ADM method was something along the lines of

PART !!CustomFolders_StartMenuPath EDITTEXT EXPANDABLETEXT REQUIRED

In the ADM format, but that obviously doesn't work in 2008 ADMX.  I attempted adding

required="true" expandable="true"

to the policy name tag with no results.

Thank you for any assistance.

omnipower321Asked:
Who is Participating?
 
omnipower321Connect With a Mentor Author Commented:
Solved it.

<policy name="MyComputerName" class="Machine" displayName="$(string.MyComputerName)" presentation="$(presentation.MyComputerName)" explainText="$(string.MyComputerName_Help)" key="SOFTWARE\Classes\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}">
<parentCategory ref="2008_Profile_Management" />
<supportedOn ref="windows:SUPPORTED_WindowsVista" />
<elements>
<text id="txtMyComputerName" valueName="LocalizedString" key="SOFTWARE\Classes\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}" expandable="true" />
</elements>
</policy>

Did not need to specify enabled and disabled values, and I was declaring the value name twice.  This works perfectly.
0
 
merowingerCommented:
you can use the tool Reg2Adm to convert a reg file into adm adm file.
Maybe this could help you
http://yizhar.mvps.org
0
 
omnipower321Author Commented:
Looking for ADMX rather than ADM, but thank you.  I tried the ADMX migrator from FullArmor, but the value keys come out blank every time.  I would like to know how to write it manually rather than rely on a converter as well for future use.
0
 
omnipower321Author Commented:
Ok, so I have made some progress, not much but some.

<policy name="MyComputerName" class="Machine" displayName="$(string.MyComputerName)" presentation="$(presentation.MyComputerName)" explainText="$(string.MyComputerName_Help)" key="SOFTWARE\Classes\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}" valueName="LocalizedString">
<parentCategory ref="2008_Profile_Management" />
<supportedOn ref="windows:SUPPORTED_WindowsVista" />
<enabledValue>
   <string>%USERNAME% on %COMPUTERNAME%</string>
</enabledValue>
<disabledValue>
   <string>Name not configured</string>
</disabledValue>
<elements>
   <text id="txtMyComputerName" valueName="LocalizedString" key="SOFTWARE\Classes\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}" required="true" expandable="true" soft="true" />
</elements>
</policy>


So there is my policy, I have the apropriate language entries as well:

<presentationTable>
   <presentation id="MyComputerName">
   <textBox refId="txtMyComputerName">
   <label>Expanding key for environment variables</label>
   <defaultValue>
   </defaultValue>
   </textBox>
   </presentation>
</presentationTable>

So this creates a REG_SZ named LocalizedString with a value of %USERNAME% on %COMPUTERNAME% which is not what I need, but it also creates a REG_EXPAND_SZ with no name and no value.

So close!  Where am I messed up?
0
All Courses

From novice to tech pro — start learning today.