Search the Community
Showing results for tags 'HTA'.
-
Hi We are moving from using SCCM OSD to using MDT for Deployments. In our SCCM OSD environment we used an HTA that would take user input and would generate a Computername (Specifically populate the OSDComputerName TS Variable). This worked fine in SCCM but since i've imported this into MDT its not working, meaning the build completes with an MDT generated Name like MININT-87976. I have disabled the computername part in MDT. I have also dumped all the variables during the OS Deployment to a text file, and ive noticed that the OSDComputerName is set to the HTA generated(correct ) name. So it seems like the variable is correct but its not passed to the OS. Any help appreciated and will provide more info if requested. Thanks
-
Frontend configuration help
SCCM2k16 posted a question in Deploying Windows 10, Windows 8.1, Windows 7 and more...
Hello, I am a new forum member and also fairly new to SCCM, MDT and Frontends etc as well. First I want to say that I am very thankful for all the great How-to´s and other information that can be found in here. It has helped me a lot, to say the least. :-) Thank you! I am installing a Lab environment just to catch up things faster with the real SCCM environment at work. The servers in Lab environment are one DC and one CM server. CM server has MDT installed. MDT is working fine, that means that I can take reference images the way I want and then implement them to SCCM. SCCM is also working just fine, I have made task sequences for win7 and win10 and with the help of PXE boot I am able to install new operating systems. All services seems ok. Pretty happy with that but it´s all thanks to this forum! :-) But of course I want to learn more...so now I want to implement Pretty Good Frontend as well! I think it is a really good feature to have in an environment. But....it´s not that easy it seems. Been reading a lot of information about it and has come to the point that I feel I really don´t have a clue what to do or what steps to take. I would really like to get a Step-by-step How-to guide that will explain everything about getting it in place. The How-to´s I´ve found is the instructions found documented for Pretty Good Frontend but I am stuck. Actually it feels like my head will explode any second because of days of extensive searching about it. Maybe I am looking at the wrong places, I don´t know. As you can see on the picture I want the frontend to look just as it is but I want it to fetch AD information and present it in the HTA. Also I want the system to add computer name suffix where it always starts with either Laptop or Workstation and then adds the serial number or anything that will separate them in the system. For example: Laptop+Serialnr would be "Laptop-12345678" I want to be able to put the computer in any OU I want if needed and I want to be able to choose what OS Image to be installed. So what I am asking is if any of you guys can guide me to simple hands-on information that will just get me through the steps that has to be taken to get all of these things working? If so I would be more than happy! If there isn´t such a thing as a Step-by-step guide to be found elsewhere that shows each step in a very simple way I want to ask if anyone in this forum is keen on making one? For me this seems to be extremely complex and I can´t get the things I am reading about it transformed to anything I understand. -
HTA does not appear during the OSD
Karthik2811 posted a question in Frontends, HTA's and Web Services
Hi Guys, My environment is not integrated with MDT,I created a HTA file where tech can select the list of OU's(I have more than 100 OU's) during the OSD, I have added the hta file to run after the Disk partitioned . While testing i am not able to see the Front end ,i can see the log files(attached) Please let me know if any thing need to be setup in additional.Also help me in adding Computer description in the same hta file. smsts.log- 5 replies
-
- HTA
- Task Sequence
-
(and 1 more)
Tagged with:
-
Hi all, I have to uninstall a software on all our computers (2000+) but the uninstall has to be interactive. The reason for this is because after that particular software is removed many programs stop working (Citrix applications, IE, Google Chrome, etc...) If I deploy the uninstall script silently the software is removed but users will start calling our helpdesk because all these programs will stop working. I have created a HTA file and a VBS script with information presented to user. User can choose to postpone the uninstall 5x or to uninstall immediately. If postponed 5 times the uninstall is forced. The HTA file + script work flawlessly if ran manually and user is local administrator. I was planning to deploy a scheduled task with SCCM that will run the HTA file at logon with the SYSTEM account because non of our users is local admin. Problem is that when running something with the SYSTEM account it is not presented on the desktop. The process is running but it is not interactive. You don't see it. Is there any way to acomplish this? Thank you
-
Hello All, My task is to trigger the HTA during windows installation and showcase the static screens while the installation continues in the background.Now the issue I'm facing is to trigger the HTA to appear on screen. I'm tying to test my sample HTA file but during installation startup, all I'm seeing is "a blank white window". Below is the code of my HTA file: <html> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <style> .fullbackground{ position:relative; width:100%; /* alternative: right:0; */ height:100%; /* alternative: bottom:0; */ } img.fullbackground{ position:absolute; z-index:-1; top:0; left:0; width:100%; /* alternative: right:0; */ height:100%; /* alternative: bottom:0; */ } .messageSection { position: absolute; width: 100%; } .mainbody, .header, .footer { padding: 5px; } .mainbody { margin-top: 25px; min-height: 150px; max-height: 388px; overflow: auto; } .messagePara { font-family: Calibri; font-size: 16pt; font-weight: bold; color: #FFFFFF; text-align: center; margin-left:20%; margin-right:20%; margin-bottom:20%;} .header { margin: auto; width: 60%; padding: 10px; text-align:left; color: #FFFFFF; font-family: Calibri; font-size: 14pt; font-weight: bold; margin-top:30px; } .footer { height: 40px; font-family: Calibri; font-size: 11pt; font-weight: bold; color: #FFFFFF; text-align: center; position: absolute; width:100%; bottom:0; left:0; } </style> <HTA:APPLICATION ID="oHTA" BORDER="none" CAPTION="no" CONTEXTMENU="no" Icon="autorun.ico" INNERBORDER="no" NAVIGABLE="yes" SCROLL="no"/> <script language="javascript"> var __TITLE_VAR_TEXT = "Sample Title"; var __COPYRIGHT_VAR_TEXT = "Sample Footer"; var __MESSAGE_DISC_VAR_TEXT = "Sample Message"; var __LINKBODYBACKGROUND_VAR_TEXT = "shuttle6b.jpg"; //background image var splashWindowWidth = 637; var splashWindowHeight = 479; if (window.screen) { splashWindowLeft = (window.screen.availWidth - splashWindowWidth) / 2; splashWindowTop = (window.screen.availHeight - splashWindowHeight) / 2; } try { window.moveTo(splashWindowLeft, splashWindowTop); window.resizeTo(splashWindowWidth, splashWindowHeight); } catch(e){} function windowOnLoad() { maxWindow(); document.title = __MESSAGE_DISC_VAR_TEXT; document.getElementById("image").src=__LINKBODYBACKGROUND_VAR_TEXT; window.setTimeout("closeScreen()",5000); } function closeScreen() { self.close(); } function maxWindow() { window.moveTo(0,0); if (document.all) { top.window.resizeTo(screen.availWidth,screen.availHeight); } else if (document.layers||document.getElementById) { if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth) { top.window.outerHeight = screen.availHeight; top.window.outerWidth = screen.availWidth; } } } </script> </head> <body style="text-align: center; " onload="windowOnLoad()"> <div class="fullbackground"> <img id="image" class="fullbackground" /> <div class="header"> <script language="javascript">document.write(__TITLE_VAR_TEXT);</script></div> <div class="mainbody"> <p id="messagePara" class="messagePara"> <script language="javascript">document.write(__MESSAGE_DISC_VAR_TEXT);</script> </p> </div> <div class="footer"> <script language="javascript">document.write(__COPYRIGHT_VAR_TEXT); </script></div> </div> </body> </html> I've updated the required INI file with the following entries:- [sample] type = command Caption=UI Reboot=No CommandLine="mshta.exe %programfiles%\Folder_1\ Folder_2\Folder_3\Folder_4\Sample.hta" I've referred the below URLs :- http://www.windows-noob.com/forums/topic/5968-hta-blank-screen/ http://blogs.msdn.com/b/joelschoenberg/archive/2008/08/18/maintenance-booting-your-windows-machines.aspx But none of the options worked. I also tried with passing the HTA file in arguments as mentioned below:- CommandLine=mshta.exe Arguments="%programfiles%\Folder_1\Folder_2\Folder_3\Folder_4\Sample.hta" but it didn't worked. NOTE: I've also used the direct path of "Sample.hta" file but it still didn't show up. Before installation, I've tried pressing F8 key and running the HTA using mshta.exe and that works completely fine. Can anyone please share some suggestions of how to execute this "HTA" from INI file and the correct commandLine value ? Thanks in advance.
-
OSD Computer Name Dynamically Adjust
dpadgett87 posted a question in Frontends, HTA's and Web Services
Hi Guys, Does anyone have a HTA or powershell front end that i can use , or suggestions on how to use a current one out there, my requirements are pretty simple i think. We have about 100 different sites in 4 different countries, and we now name our computers with the following format OFFICE-Serial where office is a 7 digit identifier for the office, and serial is the last 7 digits of the serial number. Lets say i have the following. >England >>Manchester >>London >> South London >Scotland >>Inverness >>Edinburgh Names would be MANCHE-SERIAL STHLOND-SERIAL etc. I would like a drop down first to select the country, and then a drop down to select the site with results only from the country in question I would then need OSDComputer Name to prefix 7 digits of this name and then append "-" + serial number. Can anyone help me with this? i have this which is from technet and i have modified a bit, but dont know vb well enough to modify. <!--Script Settings <ScriptSettings xmlns="http://tempuri.org/ScriptSettings.xsd"> <ScriptPackager> <process /> <arguments /> <extractdir>%TEMP%</extractdir> <files /> <usedefaulticon>true</usedefaulticon> <showinsystray>false</showinsystray> <altcreds>false</altcreds> <efs>true</efs> <ntfs>true</ntfs> <local>false</local> <abortonfail>true</abortonfail> <product /> <version>1.0.0.1</version> <versionstring /> <comments /> <company /> <includeinterpreter>false</includeinterpreter> <forcecomregistration>false</forcecomregistration> <consolemode>false</consolemode> <EnableChangelog>false</EnableChangelog> <AutoBackup>false</AutoBackup> <snapinforce>false</snapinforce> <snapinshowprogress>false</snapinshowprogress> <snapinautoadd>2</snapinautoadd> <snapinpermanentpath /> <cpumode>1</cpumode> <hidepsconsole>false</hidepsconsole> </ScriptPackager> </ScriptSettings> endregion--> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html"> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title>Imaging Solutions v2.3</title> <HTA:APPLICATION ID="maging Solutions" APPLICATIONNAME="Imaging Solutions" BORDER="none" CAPTION="yes" CONTEXTMENU="no" ICON="icon.ico" INNERBORDER="no" NAVIGABLE="true" SCROLL="no" SCROLLFLAT="yes" SELECTION="no" SHOWINTASKBAR="yes" SINGLEINSTANCE="yes" SYSMENU="yes" TITLEBAR="no" VERSION="2.2"/> <script type="text/vbscript"> '******************************************************************************' ' Global Variables ' '******************************************************************************' dim varPanel varPanel = 1 dim logHTA logHTA = "\\cm1\source files\\" & strSerialNum & ".log" Dim oTSProgressUI Set oTSProgressUI = CreateObject("Microsoft.SMS.TSProgressUI") oTSProgressUI.CloseProgressDialog() Dim strComputer strComputer = "." Dim strSerialNum Dim strUser Dim oTSEnvironment Set oTSEnvironment = CreateObject("Microsoft.SMS.TSEnvironment") '******************************************************************************' ' Window Onload Event ' '******************************************************************************' Sub Window_OnLoad '******************************************************************************' ' ComputerName Field Default Value ' '******************************************************************************' Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colSMBIOS = objWMIService.ExecQuery("Select * from Win32_BIOS") For Each objSMBIOS in colSMBIOS strSerialNum = objSMBIOS.SerialNumber Next window.document.getElementById("ComputerName").value = strSerialNum End Sub '******************************************************************************' ' Size & Positioning ' '******************************************************************************' winWidth=800 winHeight=600 window.resizeto winWidth,winHeight centerX=(screen.width-winWidth)/2 centerY=(screen.height-winHeight)/2 window.moveto centerX,centerY posX=0 posY=0 move=0 '******************************************************************************' ' Function for Dragging Window ' '******************************************************************************' Function setPos() posX=window.event.screenX posY=window.event.ScreenY move=1 End Function Function moving() If move=1 Then moveX=0 moveY=0 moveX=window.event.screenX-posX moveY=window.event.screenY-posY window.moveto(window.screenLeft+moveX),(window.screenTop+moveY) setPos() End if End Function Function stopMoving() move=0 End Function '******************************************************************************' ' Function to Close HTA ' '******************************************************************************' Function closeHTA() self.close End Function '******************************************************************************' ' Validate Variables ' '******************************************************************************' Sub runValidation If varPanel = 1 Then If ComputerName.value = "" Then msgbox("Please Enter a Computer Name") ElseIf Username.value = "" Then msgbox("Please Enter a Username") Else runInstall End If ElseIf varPanel = 2 Then runRefresh ElseIf varPanel = 3 Then runBackup End If End Sub '******************************************************************************' ' Configure Task Sequence Variables ' '******************************************************************************' Sub runInstall 'msgbox("Test: " & varPanel)' '************************************************************' ' Image Version ' '************************************************************' If ImageChoice.value = "1" Then oTSEnvironment("swn_OSPicker") = "Win7EntSP1x64" 'msgbox("OSImage Picker: " & oTSEnvironment("swn_OSPicker"))' End If '************************************************************' ' Computer Name ' '************************************************************' oTSEnvironment("OSDComputerName") = computername.value 'msgbox("ComputerName TSValue: " & oTSEnvironment("OSDCOMPUTERNAME"))' '************************************************************' ' AD OU ' '************************************************************' If ADOU.value = "1" Then oTSEnvironment("swn_ADOU") = "laptops" 'msgbox("AD OU TSValue: " & oTSEnvironment("swn_ADOU"))' ElseIf ADOU.value = "2" Then oTSEnvironment("swn_ADOU") = "laptopsnouac" 'msgbox("AD OU TSValue: " & oTSEnvironment("swn_ADOU"))' ElseIf ADOU.value = "3" Then oTSEnvironment("swn_ADOU") = "desktops" 'msgbox("AD OU TSValue: " & oTSEnvironment("swn_ADOU"))' ElseIf ADOU.value = "4" Then oTSEnvironment("swn_ADOU") = "desktopsnouac" 'msgbox("AD OU TSValue: " & oTSEnvironment("swn_ADOU"))' ElseIf ADOU.value = "5" Then oTSEnvironment("swn_ADOU") = "vdiworkstations" 'msgbox("AD OU TSValue: " & oTSEnvironment("swn_ADOU"))' End If '************************************************************' ' Set Primary User ' '************************************************************' oTSEnvironment("SMSTSUdaUsers") = Username.value '************************************************************' ' Job Role Picker ' '************************************************************' ' For Each oJobRole in rJobRole' ' If oJobRole.Checked Then' ' oTSEnvironment("swn_JobRole") = oJobRole.value' ' msgbox("You slected " & oJobRole.value & ".")' ' End If' ' Next' '************************************************************' ' Applications - Non-Licensed ' '************************************************************' '************************************************************' ' Applications - Licensed ' '************************************************************' closeHTA() End Sub Sub runRefresh msgbox("Test" & varPanel) End Sub Sub runBackup msgbox("Test" & varPanel) End Sub '******************************************************************************' ' Dump Variables ' '******************************************************************************' Sub dumpvariables Set objFSO=CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile(logHTA,8,True) For each varTSVar in oTSEnvironment.GetVariables objFile.WriteLine varTSVar & " = " & oTSEnvironment(varTSVar) Next objFile.Close End Sub '******************************************************************************' ' Panel Browsing - Change page and set variables ' '******************************************************************************' Sub setPanel1 Panel(1) varPanel = 1 End Sub Sub setPanel2 Panel(2) varPanel = 2 End Sub Sub setPanel3 Panel(3) varPanel = 3 End Sub </script> <script type="text/javascript"> '******************************************************************************' ' Panel Switching ' '******************************************************************************' var panels = new Array("","panel1","panel2","panel3"); function panel(tab) { for (i=1; i<panels.length; i++) { if (i == tab) { document.getElementById("tab"+i).className = "tabs tabs1"; document.getElementById("panel"+i).style.display = "block"; } else { document.getElementById("tab"+i).className = "tabs tabs0"; document.getElementById("panel"+i).style.display = "none"; } } } </script> <style type="text/css"> /* Layout Styles - for designing the overall template */ html,body { margin:0; padding:5px; position:relative; } html { border: 2px solid #00A6DE; } #divheader { width:100%; height:50px; position: relative; } #divcontent { width: 100%; } #divtopnav { height: 33px; width: 100%; position: relative; } #divbody { min-height: 414px; height: 100%; width:100%; position: relative; } #divbottomnav { height: 29px; width: 100%; position: relative; } #divfooter { height:50px; width:100%; position: relative; } body,td,th,h1 { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; font-size: 10px; } /* Logo Styles - for branding */ #logo1 { width: 112px; height: 49px; float: left; } #tagline { position: absolute; bottom: 0px; right: 0px; font-size: 16px; font-weight:600; float: right; } #logo2 { position: absolute; bottom: 0px; right: 0px; width: 87px; height: 43px; float: right; } /* Navigation Styles - for creating navigation bar */ #topnav { width: 100%; float: left; background-color: #f2f2f2; border-bottom: 1px solid #ccc; border-right: 1px solid #ccc; border-top: 1px solid #ccc; } #topnav ul { list-style: none; width: 100%; margin: 0 auto; padding: 0; } #topnav li { float: left; } #topnav li a { display: block; padding: 8px 15px; text-decoration: none; font-weight: bold; color: #003050; border-right: 1px solid #ccc; } #topnav li:first-child a { border-left: 1px solid #ccc; } #topnav li a:hover { color: #00A6DE; background-color: #fff; } #topnav li a:active { color: #00A6DE; background-color: #FFF; } /* ------------------------ */ #bottomnav { position: absolute; bottom: 0px; width: 100%; float: left; background-color: #F2F2F2; border-bottom: 1px solid #ccc; border-left: 1px solid #ccc; border-top: 1px solid #ccc; border-right: 1px solid #ccc; /* Remove this line if using more than one nav button */ } #bottomnav ul { list-style: none; width: 100%; margin: 0 auto; padding: 0; } #bottomnav li { float: right; } #bottomnav li a { display: block; padding: 6px 12px; text-decoration: none; font-weight: bold; color: #003050; border-left: 1px solid #ccc; } #bottomnav li:first-child a { border-right: 1px solid #ccc; } #bottomnav li a:hover { color: #FFF; background-color: #CCC; } /* Body Styles - for managing content in the body panels */ .bodypanel { height: 100%; padding: 0px; position: relative; width: 100%; z-index: 0; } #divbodysub { padding-top: 5px; } #divcontainer { width:773px; border: 1px solid #CCCCCC; float:left; padding: 0px; height: 105px; } #divcontainersplit { width:386px; border: 1px solid #CCCCCC; float:left; padding: 0px; height: 105px; } #divcontainersplit:first-child { border-right: 0px; } .divcontainersub { padding: 2px; } .containertitle { text-align:center; background-color: #F2F2F2; border-bottom: 1px solid #CCCCCC; } /* Input Styles - for changing the look of input fields */ .inputlabels { } .inputfields { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; font-size: 10px; border: 1px solid #00a6de; } .helpbutton { padding-left: 2px; } </style> </head> <body> <div class="pagewrap"> <div id="divheader" onmousedown="VBScript:Call setPos()" onmousemove="VBScript:Call moving()" onmouseup="VBScript:Call stopMoving()"> <div> <img id="logo1" src="images/logo/logo.png" /> </div> <div id="tagline"> Imaging Solutions v2.3 </div> </div> <!-- BEGIN Browsing Tabs --> <div id="divcontent"> <div id="divtopnav"> <div id="topnav"> <ul> <li id="tab1" onclick="setpanel1"><a href="#" tabindex="1002">Install</a></li> <li id="tab2" onclick="setpanel2"><a href="#" tabindex="1003">Refresh</a></li> <li id="tab3" onclick="setpanel3"><a href="#" tabindex="1004">Backup</a></li> </ul> </div> </div> <!-- END Browsing Tabs --> <!-- BEGIN Install Page --> <div id="divbody"> <div id="panel1" class="bodypanel" style="display:block;"> <div id="divbodysub"> Description: This page is for install-only scenarios of a specific OS. No backups or user data migration will occur on the machine. </div> <div id="divbodysub"> <label for="ImageName">Choose the OS Image:</label> <select id="ImageName" class="inputfields" tabindex="1" name="ImageChoice" size="1"> <option value="1">Win 7 Ent x64</option> </select><img class="helpbutton" src="images/help.png"images/Metrostation/MB_0011_info3_blue.png"" width="16" height="16" alt="Choose the image to use"> <script type="text/javascript">ImageName.focus();</script> </div> <div id="divbodysub" style="float:left"> <div id="divcontainersplit"> <div class="containertitle"> Computer Information </div> <div class="divcontainersub"> <label for="ComputerName">Computer Name:</label> <input id="ComputerName" class="inputfields" name="ComputerName" tabindex="2" type="text" size="57" maxlength="15" disabled="true"> </div> <div class="divcontainersub"> <label for="ADOU">Active Directory OU:</label> <select id="ADOU" class="inputfields" tabindex="3" name="ADOU" size="1" style="width:278px;"> <option value="1">Laptops</option> <option value="2">Desktops</option> <option value="3">Servers</option> </select> </div> <div id="divcontainersplit"> <div class="containertitle"> Locale </div> <div class="divcontainersub"> <label for="ADOU">Select Region:</label> <select id="ADOU" class="inputfields" tabindex="3" name="ADOU" size="1" style="width:278px;"> <option value="1">Scotland</option> <option value="2">Wales</option> <option value="3">Ireland</option> <option value="4">England</option> </select> </div> </div> <div id="divcontainersplit"> <div class="containertitle"> Locale </div> <div class="divcontainersub"> <label for="ADOU">Select Region:</label> <select id="ADOU" class="inputfields" tabindex="3" name="ADOU" size="1" style="width:278px;"> <option value="1">London</option> <option value="2">Manchester</option> </select> </div> </div> <div id="divcontainersplit"> <div class="containertitle"> User Information </div> <div class="divcontainersub"> <label for="Username">Domain\Username:</label> <input id="Username" class="inputfields" name="Username" tabindex="4" type="text" size="55"/> </div> <div class="divcontainersub"> <div> Job Role: </div> <div class="divcontainersub"> The username entered in the above field will determine what role based applications are installed based on the Job Role collection they are apart of.</li> </div> </div> </div> <div id="divbodysub"> <div id="divcontainer" > <div class="containertitle"> Applications - Non-Licensed </div> <div class="divcontainersub"> <!-- <input type="checkbox" name="7zip" value="7zip" tabindex="9">7-zip <input type="checkbox" name="iTunes" value="iTunes" tabindex="10">iTunes --> </div> </div> </div> <div id="divbodysub"> <div id="divcontainer" > <div class="containertitle"> Applications - Licensed </div> <div class="divcontainersub"> <!-- <input type="checkbox" name="AdobeAcro9Pro" value="AdobeAcro9Pro" tabindex="51">Adobe Acrobat v9 Pro <input type="checkbox" name="Cygnet8" value="Cygnet8" tabindex="52">Cygnet v8 --> </div> </div> </div> </div> </div> <!-- END Install Page --> <!-- BEGIN Refresh Page --> <div id="panel2" class="bodypanel" style="display:none;"> <div id="divbodysub"> Description: This page is for the reinstallation of an OS to a machine that has been previously imaged. This process gives some options for data backup. </div> <div id="divbodysub"> <label for="ImageName">Choose the OS Image:</label> <select id="ImageName" class="inputfields" tabindex="1" name="ImageName" size="1"> <option value="1">Win 7 Ent x64</option> <option value="2">Other</option> </select><img class="helpbutton" src="images/help.png" width="15" height="15" alt="Choose the image to use"> </div> </div> <!-- END Refresh Page --> <!-- BEGIN Backup Page --> <div id="panel3" class="bodypanel" style="display:none;"> Backup </div> </div> <!-- END Backup Page --> <div id="divbottomnav"> <div id="bottomnav"> <ul> <li onclick="close ()"><a href="#" tabindex="1001">Quit</a></li> <li onClick="runValidation"><a href="#" tabindex="1000">Run</a></li> </ul> </div> </div> </div> <div id="divfooter"> <div> <img id="logo2" src="images/logo/sublogo.png" /> </div> </div> </div> </body> </html>-
- Computername
- OSD
-
(and 2 more)
Tagged with:
-
I am using the CM12 bitlocker hta and want to incorporate software installation into it. I have a task sequence variable that links up to my sccm2012 repository to install firefox if the task sequence variable OSDFirefox = True My checkbox input looks like this: <input type="checkbox" name="Firefox" value="True" /> Firefox Then I have some vbscript stating: If Firefox.checked Then oTasksequence ("OSDFirefox") = "True" End if However this was not enough as the variable still was not being exported out.. In my javascript I have set to return a confirmation message which should tell me if the value is true or not. Firefox= document.getElementById("Firefox").checked; When I test these script my value for Firefox comes up as Yes all the time. What am I doing wrong?
-
I am trying to add step to my HTA file, an extra OU value if Windows 8 checkbox is checked (OU=Windows8,) in front of the OU path that gets outputted (OUName). Currently my drop down contains the following: td colspan=1 class="taskTableLeftCell">OU</td> <td class="taskTableSpanSecondAndThirdCell"> <select name="OUName" id="OUName"> <option value="LDAP://OU=Administrative,OU=Workstations,DC=imo-online,DC=com" >Administrative</option> <option value="LDAP://OU=Development,OU=Workstations,DC=imo-online,DC=com" >Development</option> <option value="LDAP://OU=External,OU=Workstations,DC=imo-online,DC=com" >External</option> <option value="LDAP://OU=IT,OU=Workstations,DC=imo-online,DC=com">IT</option> <option value="LDAP://OU=Restricted,OU=Workstations,DC=imo-online,DC=com">Restricted</option> <option value="LDAP://OU=Sales,OU=Workstations,DC=imo-online,DC=com" >Sales</option> <option value="LDAP://OU=Service_Computers,OU=Workstations,DC=imo-online,DC=com" >Service Computers</option> </select> My checkbox says the following <input type>"checkbox" id="mycheck" value"OU=Win8,"/> Then I have my Java saying: function Win8() { var x=document.getElementById("myCheck").value; document.getElementsById("Win8").innerhtml=x; } The other java code is below which adds these 2 ou values together: var OUDrop = document.getelementById("OUName") + document.getElementById("Win8"); When I try to run this and proceed in my script I get an answer- Unable to get property 'undefined' of undefined or null reference. Not sure what I am doing wrong.
-
I have determined how to properly place new computers in their appropriate OU's based on some html drop down options. However I want to go even further and place Windows8 machines in a subdirectory of the Ou's they go into. What statement should I be using for this? The only thing that specifies if it is a win 7 or 8 is the deployment. One is called Windows 7 Deployment in the software library and one is called Windows 8 Deployment. How would I use these variables?
-
I think I made an improper change in my customsettings.ini file and now my computers wont join the domain in the deployment. Where is the settings that joins the pc to the default container Computers OU located? My custom settings.ini file is below. I think my problem lies in the change computername step... [Settings] Priority=Default Properties=MyCustomProperty ; ; You can put this file in the root of MDTFiles instead of MDTSettings (quicker to update everything) ; The Webservice is running on our SCCM server ; ; to learn about how to setup Webservices see ; http://www.windows-noob.com/forums/index.php?/forum/98-frontends-and-web-services/ ; ; windows-noob.com (c) January 2013 [Default] OSInstall=Y SkipAppsOnUpgrade=YES SkipCapture=YES SkipAdminPassword=NO SkipProductKey=YES Slshare=%Deployroot%\Logs [ChangeComputerName] ;WebService=http://v-sccm2012/frontend/ad.asmx/GenerateComputerName ;Parameters=dnsDomain,prefix,uuid,MachineObjectOU ;dnsDomain=server2008.lab.local ;prefix=XXX ;uuid=0BFAAD85-B99D-426E-B338-9A4DE5F9DAAD ;OSDComputerName=String ;OSDDomainOU=String [GetSCCMAssignedSite] WebService=http://v-sccm2012/frontend/ad.asmx/GetSCCMAssignedSite AssignedSite=string [GetSiteServer] WebService=http://v-sccm2012/frontend/ad.asmx/GetSCCMSiteServer Parameters=siteCode [helloworld] WebService=http://v-sccm2012/frontend/service1.asmx/HelloWorld [helloworld3] WebService=http://v-sccm2012/frontend/service1.asmx/HelloWorld3 Parameters=name,age [IsComputerKnown] WebService=http://v-sccm2012/frontend/sccm.asmx/IsComputerKnown Parameters=MacAddress,UUID,SiteCode [GetResourceID] WebService=http://v-sccm2012/frontend/sccm.asmx/GetResourceID Parameters=MacAddress,UUID,SiteCode [GetComputerName] WebService=http://v-sccm2012/frontend/sccm.asmx/GetComputerName Parameters=MacAddress,UUID,SiteCode [SearchComputerByName] WebService=http://v-sccm2012/frontend/sccm.asmx/SearchComputerByName Parameters=SearchString,SiteCode [AddComputerAssociationByID] WebService=http://v-sccm2012/frontend/sccm.asmx/AddComputerAssociationByID Parameters=ReferenceComputerResourceId,DestinationComputerResourceId,SiteCode
-
I have been trying to add an OU selection during my deployement in my HTA and JS files, But I cant seem to get the variable MachineObjectOU to get passed along. It keeps placing everything in the Computers OU... The code in question is below: How do I write the correct javascript to pass the value?? I have MacineObejectOU = document.getElementById('MachineObjectOU').checked That does not work though, anyone have suggestions? <p><Select id=JoinDomain name=JoinDomain language=vbscript onchange="myfunction()" onpropertychange=ValidateDomainMembership accesskey=a> <option>Select Domain</option> <option value="Administrative">Administrative</option> <option value="Developement">Developement</option> <option value="External">External</option> <option value="IT">IT</option> <option value="Restricted">Restricted</option> <option value="Sales">Sales</option> <option value="Service Computers">Service Computers</option> <label class=ErrMsg for=JoinDomain>* Required</label> </p> </td> </tr> <script type="text/javascript"> function myFunction() { alert(JoinDomain.value); switch(JoinDomain.value) { case "Administrative": MachineObjectOU.value="OU=Administrative,OU=Workstations,DC=online,DC=com"; break; case "Developement": MachineObjectOU.value="OU=Developement,OU=Workstations,DC=online,DC=com"; break; case "External": MachineObjectOU.value="OU=External,OU=Workstations,DC=online,DC=com"; break; case "IT": MachineObjectOU.value="OU=IT,OU=Workstations,DC=online,DC=com"; break; case "Restricted": MachineObjectOU.value="OU=Restricted,OU=Workstations,DC=online,DC=com"; break; case "Sales": MachineObjectOU.value="OU=Sales,OU=Workstations,DC=online,DC=com"; break; case "Service Computers": MachineObjectOU.value="OU=Service Computers,OU=Workstations,DC=online,DC=com"; break; } } </script> <tr> <td colspan=2></td> <td> </td> <td id=PopupParent> <input type=text id=MachineObjectOU name=MachineObjectOU size=60 language=vbscript onpropertychange=ValidateDomainMembership accesskey=O> <input type="button" id=MachineObjectOUOptionalBtn hidefocus="1" value="▼" style="height:23; width:16; font-family: helvetica; font-size: 7pt; display: none;" onclick="JavaScript:HideUnHideComboBox();"> <div id="PopupBox" style="position:absolute; display:none; z-index:10000; width: 240px; left: 250px;" > <select size="6" id="MachineObjectOUOptional" style="width: 100%; border-style: none" onchange="JavaScript:MachineObjectOU.value = this.value;" onclick="javascript:HideUnHideComboBox();"> </select>
-
Has anyone had luck adding OU selection to the CM2012 Bitlocker FrontEnd HTA? I have been trying for some time now without luck. I have a drop down with multiple selections which link to this code below to pass the variable over. I also add options in my apply network settings which is show in the attached image. I have this: If ADOU.value = "1" Then oTSEnvironment("swn_ADOU") = "Administrative" 'msgbox("LDAP://OU=Administrative,OU=Workstations,DC=online,DC=com: " & oTSEnvironment("swn_ADOU"))' ElseIf ADOU.value = "2" Then oTSEnvironment("swn_ADOU") = "Developement" 'msgbox("LDAP://OU=Development,OU=Workstations,DC=online,DC=com: " & oTSEnvironment("swn_ADOU"))' ElseIf ADOU.value = "3" Then oTSEnvironment("swn_ADOU") = "External" 'msgbox("LDAP://OU=External,OU=Workstations,DC=online,DC=com: " & oTSEnvironment("swn_ADOU"))' ElseIf ADOU.value = "4" Then oTSEnvironment("swn_ADOU") = "IT" 'msgbox("LDAP://OU=IT,OU=Workstations,DC=online,DC=com: " & oTSEnvironment("swn_ADOU"))' ElseIf ADOU.value = "5" Then oTSEnvironment("swn_ADOU") = "Restricted" 'msgbox("LDAP://OU=Restricted,OU=Workstations,DC=online,DC=com: " & oTSEnvironment("swn_ADOU"))' ElseIf ADOU.value = "5" Then oTSEnvironment("swn_ADOU") = "Sales" 'msgbox("LDAP://OU=Sales,OU=Workstations,DC=online,DC=com: " & oTSEnvironment("swn_ADOU"))' ElseIf ADOU.value = "5" Then oTSEnvironment("swn_ADOU") = "Service Computers" 'msgbox("LDAP://OU=Service_Computers,OU=Workstations,DC=online,DC=com: " & oTSEnvironment("swn_ADOU"))' End If
-
Hey, I am looking at expanding on Niall's CM2012 Front End HTA and wanted to know if I what I was planning to do was possible as I'm finding it hard to find a resource that give me definitive answer. Basically what I want to do is: Modify the HTA to have two drop down boxes, one for role and one for OU. Have the drop downs display a list of roles passed back from Maik Koster's webservices using GETOUs and GETROLES. Be able to select these roles and pass these variables into the task sequence. Is this do-able? Is this the best way of doing it? I've seen mention of how to do this by manually setting which OU's are available but this seems like an administrative overhead every time OU's are added/changed. Any tips? Thanks!
-
Hi guys hope you can help me found this HTA a wile ago and im trying to adapt it to sccm2012 but my hta skills are bit Noob based, can you help me my mission is to have desktop support to be able to add machine to collections thats basicaly defined by myself. Change this to match your setup ("<SMSSERVERNAME> or <SMSSQLServer>","root\SMS\site_<SMS SITE CODE>") Add Computer to Collection.hta <head> <title>Add computers to Collection</title> <body background = "background.jpg"> Add Computer to Collection <BR> <hr> <HTA:APPLICATION ID="Addcompcol" APPLICATIONNAME="Addcomputer" SCROLL="NO" SINGLEINSTANCE="yes" WINDOWSTATE="normal" SYSMENU="no" > </head> <script language="VBScript"> Sub Closeme window.close() end sub Sub Window_Onload window.moveTo 200,200 window.resizeto 500,500 'width x height end sub </script> <body onload=Window_Onload onkeypress="Checkenter"> <script language="VBScript"> On error resume next Set Shell = CreateObject("Wscript.Shell") Set oFSO = CreateObject("Scripting.FileSystemObject") Set SWbemLocator=CreateObject("WbemScripting.SWbemLocator") set SWbemServices = SWbemLocator.ConnectServer("<SMSSERVERNAME> or <SMSSQLServer>","root\SMS\site_<SMS SITE CODE>") If Err.Number Then Err.Clear Closeme() End If sub search() count=0 if findcomp.value <> "" Then strQuery = "select * from SMS_CM_RES_COLL_SMS00001 where name like '%"& findcomp.value &"%'" Set Computers= SWbemServices.ExecQuery(strQuery) strHTML= strHTML & "<select size=""6"" name=""Computerlisting"" multiple width:200"">" for each Computer in Computers count=count+1 if count<50 then ' strHTML= strHTML & "<BR>" & Computer.Name ' msgbox Computer.ResourceID strHTML= strHTML & "<option value="& Computer.ResourceID &">"& Computer.Name &"</option>" End if Next Output.InnerHTML = strHTML End if end sub '''''''''''''''' Sub Checkenter If window.event.Keycode = 13 Then search() End If End Sub sub searchcollection() count=0 if findcoll.value <> "" Then strQuery = "select * from SMS_Collection where name like '%"& findcoll.value &"%'" Set Collections= SWbemServices.ExecQuery(strQuery) strHTML= strHTML & "<select size=""6"" name=""Collectionlisting"" multiple width:300"">" for each Collection in Collections count=count+1 if count<50 then ' strHTML= strHTML & "<BR>" & Computer.Name ' msgbox Computer.ResourceID strHTML= strHTML & "<option value="& Collection.CollectionID &">"& Collection.Name &"</option>" End if Next strHTML= strHTML & "</select><BR><hr>" strHTML= strHTML & "<input type=""button"" value=""Add to Collection"" onClick=""addcomputers"">" OutputCol.InnerHTML = strHTML End if end sub sub addcomputers() '''''''' For Each Computerselect in Computerlisting.Options if Computerselect.Selected then ComputerResourceID = Computerselect.value ' this is the resource value of the computer selected end if Next '''''''' For Each Collectionselect in Collectionlisting.Options if Collectionselect.Selected then collectionquery = "SMS_Collection.CollectionID='"&Trim(Collectionselect.value)&"'" Set oCollection = SWbemServices.Get(collectionquery) Set newDirectRule = SWbemServices.Get("SMS_CollectionRuleDirect").SpawnInstance_ newDirectRule.ResourceClassName = "SMS_R_System" newDirectRule.ResourceID = ComputerResourceID ' Add the new query rule to a variable. Set oCollectionRule = newDirectRule oCollection.AddMembershipRule oCollectionRule end if Next '''''''''' 'oCollection.RequestRefresh True strHTML="Computer has been added!" Output.InnerHTML = "" OutputCol.InnerHTML = strHTML end Sub '''''''''''''''' Sub Checkentercollection If window.event.Keycode = 13 Then searchcollection() End If End Sub </script> Computer Name Search <input type="value" style="background-color:#ffb7d6" name="findcomp" size="20" > <input type="button" value="OK" name="acceptcomp" onClick="search" style="background:red; "> <BR> <hr> <span id="Output"></span> <BR> <HR> Collection Name Search <input type="value" style="background-color:#ffb7d6" name="findcoll" size="20" > <input type="button" value="OK" name="acceptcoll" onClick="searchcollection" style="background:red; "> <BR> <hr> <span id="OutputCol"></span> <input type="button" value="Close Window" name="Closeout" onClick="Closeme" style="background:white; "> </body>
-
Hi All I want have a TS (Task Sequence)(is running when the user is logged onto the system, not in OSD(OS Deployment)) with several steps, one if them being a .hta file that warns the user that a change in software is comming and they need to close down Outlook. My problem is that the TS gets stuck when it reaches the .hta file step, just hangs untill I shut it down by force (kill the process). My setup: "Run Command Line" Command Line: "Name of file" Tick in Package: "Package containing the file" In Otions the default Success codes are set til 0 3010 (have no idea on what this is used for?) / Claus
-
Collect Variables in Windows Via HTA for Task Sequence
ryman posted a question in Frontends, HTA's and Web Services
I am working with an HTA frontend to collect information from the user and pass this information to the task sequence for the OS build. I started with advertising the task sequence within Windows to the computer. The user launch the advertisement, it gathers some information and the HTA opens for some user input. This all works fine, the issue is when I try to collect my variables with the object ("Microsoft.SMS.TSEnvironment") I get an error. I understand that I can not use this object just within Windows but, it is being launch by the task sequence in the task sequence. Am I missing something? or How do I pass variables from within Windows I need to the task sequence so I can use them during the build? -
I found the HTA tool on this site but I wanted to know if there are any HTA style tools that are written in PowerShell. I know PS a little but and I wanted to create a custom HTA for a Windows 7 OSD using CM2012. And if not can I use a PowerShell front end with CM2012 OSD? I can create prompts and query AD with PS so it would make my life easier. Thanks.
-
The HTA windows didn't show during the TS
Canada Jack posted a question in Frontends, HTA's and Web Services
Hi Guys I want add one HTA into the TS, so the user can make some selection during the OS deploy. The HTA is work by manual test. But the problem is: It's seem the HTA is hidden by the TS. I can't see any HTA windows. Any idea? Thanks. -
Hi, We are currently upgrading over 5000 pc's and laptops to Win7 using SCCM 2007 and a FrontEnd HTA for selecting software . At the moment there is a different task sequence for every department. I have been looking into using one task sequence and a HTA to select department and Ou computer name ect. So far I just have the HTA allowing users to select and install software. Its a work in progress. Today I have just discovered UDI Wizard Designer in MDT 2012. Can anyone tell me if it is is possible to use this in SCCM 2012 to build a task sequence and if there are any tutorials out there on how todo that. It looks a lot easier than using a HTA and formatting that when you want to make a change and has all the bits we need to select. We would like to let are deployment team select if they are building a pc or laptop with bitlocker, to choose the dept, OU and software Any help would be great.
-
- sccm 2007
- udi designer
-
(and 1 more)
Tagged with: