KACE Product Support Question

Set Variable in Preinstallation Task for use in Post Installation Task - K2000

05/10/2014 2381 views

I am using the GetComputerName and SetComputerName executables for my scripted installs so we can name the computer at the beginning of the install and walk away until completion.

I also have a vbscript that I use to join the computer to the domain.  I feed the Username, Password, and OU to the script but I would like to not have to put a password in with the Post Installation task.  Is there a way like the GetComputerName PreInstall task that I can prompt for the Password during PreInstall and use it as a variable for my script in the PostInstall?

1 Comment   [ + ] Show comment


  • Hello,
    any special reason why you do not want to put a password in with the Post Installation task?
    Is that for security concerns or to be able to generalize more the procedure?
    • Convinence mostly. We have a scripted install with a VBscript that will join the computer to the domain in the appropriate container of AD. The script is written to accept the container, username, and password. I may need to change the password at some point in the future so I would rather not have to go to each of the 15 scripted installs and change it.
      • I understand. I do not think that there is a way to use GetComputerName for that but I have another couple of ideas you may use:
        1-(simpler) store the password (scambled if you want) in a file on a share of one of your file servers (\\Myserver\mypass\mypass.txt), amend your script to read that value, unscramble it if needed and then use it...
        2-(more complex but not so much)-store the password in a database and modify the script to read it...
        Kind regards,
        Marco = StockTrader

All Answers


you can create a script that sets a variable that gets passed to your other scripts.

Set PassWRD=thepasswordtouse

So instead of calliing container, username, and password you would call container, username, and %PassWRD%.  You may have to modify your vbs scripts to change from user input %3 to %PassWRD% in the script

container, username, and password
Answered 05/12/2014 by: SMal.tmcc
Red Belt

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ