Link to home
Start Free TrialLog in
Avatar of omnipower321
omnipower321Flag for United States of America

asked on

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.

Avatar of merowinger
merowinger
Flag of Germany image

you can use the tool Reg2Adm to convert a reg file into adm adm file.
Maybe this could help you
http://yizhar.mvps.org
Avatar of omnipower321

ASKER

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.
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?
ASKER CERTIFIED SOLUTION
Avatar of omnipower321
omnipower321
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial