Set Variable in Preinstallation Task for use in Post Installation Task - K2000
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?
Answers (1)
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
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? - StockTrader 10 years ago
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 - StockTrader 10 years ago