Post by jmarcum on Oct 14, 2019 14:36:01 GMT
I'm sure I am totally butchering this XML here so hoping someone can help me out. My goal is to automatically name computers according to this format:
Machine Type (L=laptop,W=Desktop,V=Virtual), Location code (1,2 or 3 based on a location code drop-down menu), Department code (01-99 based on location dropdown of location names), image type (1,2,3,4,5 or 6 based on a dropdown of image type. this also defines the apps that get installed), service tag
This is what I have so far. I'm sure it is totally wrong but I think it's close enough to get the idea of what I am trying to do. Any help is much appreciated!
Machine Type (L=laptop,W=Desktop,V=Virtual), Location code (1,2 or 3 based on a location code drop-down menu), Department code (01-99 based on location dropdown of location names), image type (1,2,3,4,5 or 6 based on a dropdown of image type. this also defines the apps that get installed), service tag
This is what I have so far. I'm sure it is totally wrong but I think it's close enough to get the idea of what I am trying to do. Any help is much appreciated!
<?xml version="1.0" encoding="utf-8"?>
<UIpp Title="Customer" Icon="customer.ico" Color="#0056A3" DialogIcons="True" Flat="False">
<Software>
<Package Id="AdobeReaderDC" Label="Adobe Reader DC" PkgID="PJM00060" ProgramName="Adobe Reader DC" />
</Software>
<Actions>
<Action Type="Info" Name="WelcomeInfo" Title=" Welcome" ShowCancel="True" Timeout="120" TimeoutAction="Continue" Image="customer.png">
<![CDATA[Velkommen – Welkom - Tere tulemast – Bienvenue – Willkommen – Bienvenido – Välkommen]]>
</Action>
<Action Type="DefaultValues" ValueTypes="All" ShowProgress="True" />
<Action Type="Preflight" Title="Preflight checks" ShowOnFailureOnly="False" ShowBack="True">
<Check Text="WLAN Disconnected" Description="To prevent issues during deployment, a wired connection is required." ErrorDescription="Please disconnect the wireless network from this system." CheckCondition='"%XWLANDisconnected%" = "True"' />
<Check Text="Not on battery" ErrorDescription="Please ensure that the system is connected to AC Power." CheckCondition='"%XOnBattery%" = "False"' />
<Check Text="Minimum memory > 1GB" CheckCondition='%XHWMemory% >= 1024' />
<Check Text="CPU Supports Windows 8+" CheckCondition='%XCPUPAE% AND %XCPUNX% AND %XCPUSSE2% = True' />
</Action>
<Action Type="Input" Name="InfoInput" Title="System Name and Type">
<!-- <TextInput Prompt="System Name" Hint="Please enter the name for this system." RegEx=".{3,15}" Variable="SystemName" Question="Name of this system" /> -->
<ChoiceInput Variable="SystemType" AlternateVariable="SystemTypeCode" Sort="False" Question="Please choose a type for this system" Required="True" AutoComplete="False">
<Choice Option="Kiosk" AlternateValue="Kiosk" />
<Choice Option="Open Kiosk" AlternateValue="OpenKiosk" />
<Choice Option="Desktop" AlternateValue="Desktop" />
</ChoiceInput>
<ChoiceInput Variable="Location" AlternateVariable="LocationCode" Sort="False" Question="Please choose a location for this system" Required="True" AutoComplete="False">
<Choice Option="Main Hospital" AlternateValue="MainHospital" />
<Choice Option="DCS" AlternateValue="DCS" />
<Choice Option="MSC" AlternateValue="MSC" />
</ChoiceInput>
</Action>
<Action Type="TSVar" Name="LocCode"> </Action>
<Action Type="Switch" OnValue="%DeptCode%">
<Case RegEx="MainHospital|DSC|MSC">
<Variable Name="LOC">%LocCode%</Variable>
</Case>
<Case RegEx="MainHospital">
<Variable Name="LOC">1</Variable>
</Case>
<Case RegEx="DCS">
<Variable Name="LOC">2</Variable>
</Case>
<Case RegEx="MSC">
<Variable Name="LOC">3</Variable>
</Case>
<Default>
<Variable Name="LOC"></Variable>
</Default>
</Action>
<Action Type="Input" Name="InfoInput" Title="Department">
<ChoiceInput Variable="Department" AlternateVariable="Department" Sort="False" Question="Please choose a location for this system" Required="True" AutoComplete="False">
<Choice Option="Surgery" AlternateValue="Surgery" />
<Choice Option="Outpatient" AlternateValue="Outpatient" />
<Choice Option="Physical Therapy" AlternateValue="PhysicalTherapy" />
</ChoiceInput>
</Action>
<Action Type="TSVar" Name="DeptCode"> </Action>
<Action Type="Switch" OnValue="%DeptCode%">
<Case RegEx="Surgery|Outpatient|PhysicalTherapy">
<Variable Name="Dept">%LocCode%</Variable>
</Case>
<Case RegEx="Surgery">
<Variable Name="Dept">1</Variable>
</Case>
<Case RegEx="Outpatient">
<Variable Name="Dept">2</Variable>
</Case>
<Case RegEx="PhysicalTherapy">
<Variable Name="Dept">3</Variable>
</Case>
<Default>
<Variable Name="Dept"></Variable>
</Default>
</Action>
<Action Type="TSVar" Variable="SystemOU" Condition='"%SystemTypeCode%" = "Kiosk" And "%XHWChassisType%" = "Laptop"'>"OU=Laptops,DC=inside,DC=com"</Action>
<Action Type="TSVar" Variable="SystemOU" Condition='"%SystemTypeCode%" = "Kiosk" And "%XHWChassisType%" <> "Laptop"'>"OU=Workstations,DC=inside,DC=com"</Action>
<Action Type="TSVar" Variable="SystemOU" Condition='"%SystemTypeCode%" = "OpenKiosk" And "%XHWChassisType%" = "Laptop"'>"OU=IT,OU=Laptops,DC=inside,DC=com"</Action>
<Action Type="TSVar" Variable="SystemOU" Condition='"%SystemTypeCode%" = "OpenKiosk" And "%XHWChassisType%" <> "Laptop"'>"OU=IT,OU=Workstations,DC=inside,DC=com"</Action>
<Action Type="TSVar" Variable="SystemOU" Condition='"%SystemTypeCode%" = "Desktop" And "%XHWChassisType%" = "Laptop"'>"OU=Windows10,OU=Laptops,DC=inside,DC=com"</Action>
<Action Type="TSVar" Variable="SystemOU" Condition='"%SystemTypeCode%" = "Desktop" And "%XHWChassisType%" <> "Laptop"'>"OU=Windows10,OU=Workstations,DC=inside,DC=com"</Action>
<!-- <Action Type="AppTree" Title="Please choose your software">
<SoftwareSets>
<Set Name="Default">
<SoftwareGroup Id="952025F7-BC5D-4D1C-960C-002B77323479" Label="Optional Software">
<SoftwareRef Id="AdobeReaderDC" />
</SoftwareGroup>
</Set>
</SoftwareSets>
</Action> -->
<Action Type="Info" Name="FinalInfo" Title="Summary" Image="Customer_Logo_Logo.png" ShowCancel="True" ShowBack="True" >
<![CDATA[<b>System name:</b> %SystemName%<br><b>OU:</b> %SystemOU%]]>
</Action>
<Action Type="TSVar" Name="OSDComputerName" DontEval="True">%SystemName%</Action>
<Action Type="TSVar" Name="OSDDomainOUName" DontEval="True">%SystemOU%</Action>
</Actions>
</UIpp>