Home > SCCM > Prompt for Password, UDA and Computer Name in a tasksequence.

Prompt for Password, UDA and Computer Name in a tasksequence.

Hello. Long time since i wrote something, will try and post more frequently.

So i´ve been using a HTA app to prompt for a password at the beginning of each task sequence. Why you ask? let´s say you have task sequences for Client OS and some for Server OS, you might not want anyone to deploy those but if you set a PXE password you would need to distribute that password to everyone that needs to deploy Client.

There is a great post on all this written by Niall Brady over at Windows-Noob and most of this is taken from there. http://www.windows-noob.com/forums/index.php?/topic/2336-password-protect-a-task-sequence/page-2 i found the HTA there and have modified it to include prompts for Primary User and Computer name Below is the HTA im not the greatest wizard with Graphics but you get the Picture.


There are also a prompt for Primary user and one for computer name you can download the HTA from

you can download a sample of the task sequence here and just copy it to your own.


To display a HTA in WinPE you need to have MDT integrated to you SCCM enviroment. i added the files to a folder called WNB and copied that to the script folder inside the MDT toolpackage source. but you can create your own package and reference that when you call the script. just make sure you load the MDT toolpackage Before the passwordprompt. Before you implement it you need to edit Password.hta with your favorite text editor The three prompts set 3 variables. ALLOWOSDBUILD wich is set YES if you input the right password, if you dont then the task sequence will fail and shutdown the computer, to change the password edit line 98, default password is password SMSTSUdaUsers wich is the built in UDA Variable that sets primary user, if you only have 1 domain change the domain\ on line 113 then you only need to input the username without domain\ first. if you have multiple domains just remove domain\ OSDComputerName wich is the built in variable that sets computer name wont go into more details on this pretty obvious. There is a check on line 104 to 109 that the username and compuername is between 5 and 10/15 characters long and the computername is changed to uppercase characters on line 114

Categories: SCCM
  1. Evan
    January 16, 2014 at 15:10

    Your links are no longer working. I am very interested in your solution. Could you provide a new link?

    • June 13, 2014 at 07:50

      Sorry i have updated the links. for some reason dropbox thinks my links are generating to much trafic…

  2. Tony
    June 12, 2014 at 20:33

    The links to the HTA and task sequence are broken, will you please repost the data so I could download them to take a look? Thanks! –Tony

    • June 13, 2014 at 07:51

      Sorry i have updated the links. for some reason dropbox thinks my links are generating to much trafic…

      • Tony
        June 13, 2014 at 17:06

        Thanks! I am having trouble importing the task sequence. I am receiving an “Import Failure”. Cannot validate a dependency to Package CCL00019. Maybe the task sequences needs to be re-exported… Thoughts?

  3. Tony
    June 19, 2014 at 12:15

    Tjindar, Where in the task sequence are you calling the HTA? Is it the very first step or do you call it after the partitioning steps?

    • June 19, 2014 at 13:30

      The very fist step before partitioning. i have reuloaded the example TS try it again now.

      • Tony
        June 20, 2014 at 18:50

        Still having trouble importing the task sequence, but don’t worry about it. I do have another question about the task sequence. Under the deployment properties, on the Distribution Points tab, how is the deployment option set? Download content locally when needed by running task sequence?

  4. Tony
    June 24, 2014 at 17:52


    I think I got this up and running for the most part now, but I am still having a problem. It is with the “Shutdown” portion of the task sequence. I have these options set: If All the conditions are true: Task Sequence Variable ALLOWOSBUILD not equals “YES”. Even though I input the correct password, the shutdown step still runs. Do you have any insight why that would be? Am I missing something? I have been using your blog and this one on Windows-Noob in an attempt to get this all working: http://www.windows-noob.com/forums/index.php?/topic/2336-password-protect-a-task-sequence/


    • June 24, 2014 at 21:31

      It should be ALLOWOSDBUILD you for got the D 🙂

      • Tony
        June 25, 2014 at 23:54

        Awesome! I am in business, but not sure how I missed that small detail. Thanks!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: