Hello,
I have a batch file that gets called by Winpeinit this batch copies some files and scripts locally and then one of those scripts is a small script that make use of WMI to get the Asset Tag or Serial Number. This then finds the sysprep.xml and replaces a predetermined keyword with this so that the PC gets a proper name based on the SN.
My question is that then I need this script to set a variable that can be used on the parent script. This is so that i can create a folder with the PC's serial number save all the profiles there with USMT and then upload that folder to specific network share.
Any ideas how i can get this done? It seems that if i change the script to execute: WScript.Echo "SET MYVAR=" & strHostName" and then so a echo %MYVAR% from the batch the variable is not set.
Any ideas?
Thanks.
↧