/build/static/layout/Breadcrumb_cap_w.png

USMT Work Around for K2000 RSA using DFS Namespaces

I am trying to use the K2000 RSA's to upgrade OS's on some machines in remote offices. Problem is the RSA's wont do the USMT, and every profile tries to go back to the K2000 appliance back in HQ (Bad Times)

Here is what i am thinking, and could use a bit of help...


Setup:
a K2000 Appliance at my HQ
a K2000 RSA at each remote location
An AD DFS Share at every location for USMT Data, prestaged with USMT files (in my case \\domain.local\usmt) - This will map to a local (LAN) server via a DFS Namespace



PreInstall task:
@ECHO OFF
echo Copying Migration Tool to Local Disk
Net use h: \\domain.local\usmt /user:domain\user pass
xcopy H:\amd64 C:\USMT\amd64\ /s /q
set USMT_WORKING_DIR=C:\USMT\amd64
set MIG_OFFLINE_PLATFORM_ARCH=64
c:
cd C:\USMT\amd64
scanstate h:\profiles\%computername% /offline:c:\amd64\offline.xml /i:migapp.xml /i:miguser.xml /o /config:config.xml /uel:30 /ue:* /v:5

Challenge--- Need to pass the hostname of the system being imaged which is not the hostname of the PE load running in this state. I have seen Kace scripts that do this (collect Computer Name), but I dont know how to pass the info to my script.

Challenge #2 --- If the PE load is 32 bit and the os is 64 bit (or vice-versa) which platform do i need to configure for the Scanstate to work?




Machine is built with scipted install, reading and retaining computername






PostInstall task:
@ECHO OFF
echo Copying Migration Tool to Local Disk
Net use h: \\domain.local\usmt /user:domain\user pass
xcopy H:\amd64 C:\USMT\amd64\ /s /q
set USMT_WORKING_DIR=C:\USMT\amd64
set MIG_OFFLINE_PLATFORM_ARCH=64
c:
cd C:\USMT\amd64
LoadState.exe h:\profiles\%computername% /i:migapp.xml /i:miguser.xml /lac




This would potentially give some ability on the RSA to refresh os's. Any help? Tips? Comments?



Thank you!

0 Comments   [ + ] Show comments

Answers (2)

Posted by: warmep 12 years ago
Third Degree Green Belt
3
Challenge #1- Since you are using the Get and Set Computer Name tasks, you could look in the T: drive in KBE, the computer name will be stored temporarily in a file named as the MAC address

Challenge #2 - As long as you set the architecture correctly when uploading the source media in the K2000 media manager, this should not be an issue as the architectures will match. You are only be able to deploy x86 Scripted Installs from KBE x86, and x64 Scripted Installs from KBE x64.

Same thing with images, you should only capture x64 images with KBE x64, and x86 images with KBE x86.
Posted by: sprintgeek 12 years ago
Senior Yellow Belt
1

I used the get computername script from Kace to get the Hostname and launch my scanstate batch with the hostname as a variable:

 

 

Set fso = CreateObject("Scripting.FileSystemObject")
Set diskDrives = fso.Drives

regFound = False
'Search through fixed drives (Drivetype = 2) for required registry file.
For Each drive In diskDrives
    If (drive.DriveType = 2) and fso.FileExists(drive.DriveLetter & ":\WINDOWS\System32\Config\SYSTEM") Then
        systemDrive = drive.DriveLetter
        regFound = True
        exit for
    End If
NEXT


'Get the computer name from the registry
Set wshShell = CreateObject("WScript.Shell")
Set execStatus = wshShell.Exec("reg load HKLM\TEMP_SYSTEM " & systemDrive & ":\WINDOWS\System32\Config\SYSTEM")
'Wait for registry to load completely (max 10 seconds)
count = 0
Do While (count < 10) and execStatus.Status = 0
    WScript.Sleep 1000
    count = count + 1
Loop
If execStatus.Status = 0 Then
    WScript.Quit
End If

regKeyCompName = "HKLM\TEMP_SYSTEM\ControlSet001\Control\ComputerName\ComputerName\ComputerName"
compName = wshShell.RegRead(regKeyCompName)

WScript.echo compname


WshShell.Exec("reg unload HKLM\TEMP_SYSTEM")
WScript.Sleep 1000


    Set objShell = WScript.CreateObject("WScript.Shell")
    objShell.Run("%comspec% /K offline_scanstate64.bat " & compname ), 1, True

 

compNameFile.WriteLine(compName)
compNameFile.Close

 

Here is my Scanstate Batch:

Net use h: /delete
Net use h: \\domain.local\usmt /user:domain\user pass
rd C:\USMT\amd64 /q /s
xcopy H:\amd64 C:\USMT\amd64\ /s /q
set USMT_WORKING_DIR=C:\USMT\amd64
set MIG_OFFLINE_PLATFORM_ARCH=64
c:
cd C:\USMT\amd64
scanstate h:\profiles\%1 /offline:%cd%\offline.xml /i:migapp.xml /i:miguser.xml /o /config:config.xml /uel:30 /ue:* /v:5
y:
cd y:\preinstall\20\contents

 

Don't be a Stranger!

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

Sign up! or login

Share

 
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