Jump to content


anyweb

How can I dynamically deploy multiple operating systems with System Center 2012 R2 Configuration Manager ?

Recommended Posts

On ‎6‎/‎21‎/‎2017 at 10:44 PM, teaseler said:

Hi - Is it possible to have more than three OS's to choose from?

Not sure if you still need help with doing more than 3, but I just made it work today.

You have to edit the file called validation.js and add in the additional OS Values.

Validation.js is located under \common\js

Starting at Line #256 - I expanded it to have 6 options, but you could go for as many as you want:

 sHTML = "<option value='OSValue1'>" + oEnvironment("OSName1") + "</option>\n";
  if(oEnvironment("OSName2"))
   {sHTML = sHTML + "<option value='OSValue2'>" + oEnvironment("OSName2") + "</option>\n";
  }
 if(oEnvironment("OSName3"))
  {sHTML = sHTML + "<option value='OSValue3'>" + oEnvironment("OSName3") + "</option>\n";
  }
 if(oEnvironment("OSName4"))
  {sHTML = sHTML + "<option value='OSValue4'>" + oEnvironment("OSName4") + "</option>\n";
  }
 if(oEnvironment("OSName5"))
  {sHTML = sHTML + "<option value='OSValue5'>" + oEnvironment("OSName5") + "</option>\n";
  }
 if(oEnvironment("OSName6"))
  {sHTML = sHTML + "<option value='OSValue6'>" + oEnvironment("OSName6") + "</option>\n";
  }
 sHTML = "<select id='ImageDropDown' name='ImageDropDown'>\n" + sHTML + "</select>";
 sHTML = sHTML + "<div class='coupontooltip' style = 'border:1px solid black; padding: 10px;'>\n";
 sHTML = sHTML + oEnvironment("Tooltip1");
 sHTML = sHTML + "</div>\n";
 document.getElementsByName('tblNewDetails').item(0).innerHTML = sHTML;

 // process the refresh bits...

 sHTML = "<option value='OSValue1'>" + oEnvironment("OSName1") + "</option>\n";
 if(oEnvironment("OSName2"))
  {sHTML = sHTML + "<option value='OSValue2'>" + oEnvironment("OSName2") + "</option>\n";
  }
 if(oEnvironment("OSName3"))
  {sHTML = sHTML + "<option value='OSValue3'>" + oEnvironment("OSName3") + "</option>\n";
  }
 if(oEnvironment("OSName4"))
  {sHTML = sHTML + "<option value='OSValue4'>" + oEnvironment("OSName4") + "</option>\n";
  }
 if(oEnvironment("OSName5"))
  {sHTML = sHTML + "<option value='OSValue5'>" + oEnvironment("OSName5") + "</option>\n";
  }
 if(oEnvironment("OSName6"))
  {sHTML = sHTML + "<option value='OSValue6'>" + oEnvironment("OSName6") + "</option>\n";
  }

I just tested it with OS #6 and it's working great.  Hope this helps.

Share this post


Link to post
Share on other sites

This works really great thus far! 

We have only Win10 here at our site, however we run into instances where either a shared version for office is needed, to a standalone .msi for our warehouses.  The drop down menu and variable logic allowed me to have multiple "Install applications" steps re-using the same variables.  Works like a champ so far!

I do have one question: Can someone maybe direct me to where I can modify/expand the image selection drop down menu?

Share this post


Link to post
Share on other sites

Hej Niall, this is my first post after many years following your great posts, so thank you for your great effort (Tack).

Is there any limits on how many variables (options) to show in HTA? I'm struggling to make HTA show 6 language options, but it only shows 4 and the 4 are working fine.

Please find some screenshots in the attached doc, as I said it only show the first 4 and not showing German and italian:

OSName1 swedish

OSName2 English

OSName3 Frensh

OSName4 Spanish

OSName5 German

OSName6 Italian

What I'm doing wrong?

 

Thank you in advance.

 

 

=====================

Update (Resolved):

 

I figured it out by myself, it was validation.js, thanks anyway

 

Edited by Simosimo
Resolved

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.