Jump to content
DeployCentral

Computer Name from WMI - Why does this get captured before imaging?


ketterj

Recommended Posts

Hi All,

We set the Asset Tag in the BIOS on HP Probooks and have SmartDeploy grab that for the Computer Name. This has been working fine, except I wanted to make machine deployment even easier by running a PREIMAGE script with a pop up window to edit the HP Bios directly. This script does work in the Preimage phase and does edit the BIOS, however it appears as though SmartDeploy has already made its mind up at this point that It hasn't found an Asset Tag (as its blank) and uses a custom host name instead.

I am wondering why SmartDeploy has already run this command by this point, and if there is a way to run another script or executable to get SmartDeploy to recapture the host name?
Any assistance would be great!

Link to comment
Share on other sites

Thanks. What are some other options here?

I edited the winpeshl.ini in the boot.wim file, it now looks like this:

[LaunchApp]
AppPath = %SystemRoot%\system32\SetAsset.cmd
AppPath = %SystemRoot%\system32\SmartPE.exe
AppPath = %SystemRoot%\system32\SdShell.exe

My SetAsset.cmd file asks the user for input, and then executes the HP Bios Utility which I also moved to C:\Windows\System32 on the boot.wim file.

SetAsset.cmd
SET /P TAG=[Please enter the Asset Tag: ]
pushd "%~dp0"
BiosConfigUtility64.exe /setvalue:"Asset Tracking Number","%TAG%"

This actually works for my input, and does set the AssetTag in the BIOS! Which is great, But the system reboots instead of launching SmartPE.exe. Looks like I'm getting close, I'm going to try launching SmartPE and SdShell from my CMD file.

Cheers!

Link to comment
Share on other sites

Well, it appears as though editing the following files has enabled me to achieve what I need.

winpeshl.ini
[LaunchApp]
AppPath = %SystemRoot%\system32\SetAsset.cmd

SetAsset.cmd
SET /P TAG=[Please enter the Asset Tag:]
pushd "%~dp0"
BiosConfigUtility64.exe /setvalue:"Asset Tracking Number","%TAG%"
BiosConfigUtility64.exe /setvalue:"Ownership Tag","The Company%"
cls
SmartPE.exe
start "" SdShell.exe
exit

Just a bit of pain for 1 person to rejig the boot.wim each time we make a new USB Key media, but saves many down the line!

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...