/build/static/layout/Breadcrumb_cap_w.png

Get/Set Computer Name on Image Fail.

So I've been using the built in K2000 Get and Set computer name scripts and generally they work well. However if the imaging process fails and needs to be reran the name of the machine is lost. This is especially bad in my case since I have to image multiple labs.

Is there any way to have the name of the machine not get lost in case the imaging process fails and needs to be restarted?

Thanks

0 Comments   [ + ] Show comments

Answers (1)

Posted by: SMal.tmcc 9 years ago
Red Belt
2
the built in get script writes to X:  which is the ram drive in memory.  so a reboot- kiss that good bye

Set compNameFile = fso.CreateTextFile("X:\" & macAddress, True)

you would need to create a modifed get set pair of scripts that go to a mapped drive instead to keep this info.  I use windows shares to deploy my wims so I could write to the same share as the wims are stored. 

Comments:
  • if you do this:
    if you have to rerun a machine you only need to use the apply computer name part, otherwise the get name would put garbage data in that folder. - SMal.tmcc 9 years ago
  • Thanks. I ended up saving to the T:\ drive and checking if the file already existed.

    Here were my changes to the GetComputerName.vbs file

    'Dump the computer name into a file named as the mac address inside X:
    If fso.DriveExists("T:") then
    'Get mac adress
    Set objSysEnv = wshShell.Environment("PROCESS")
    macAddress = objSysEnv("MAC_ADDRESS")

    If fso.FileExists("T:\" & macAddress) Then
    WScript.Quit
    Else
    Set compNameFile = fso.CreateTextFile("T:\" & macAddress, True)
    End If

    Else
    usbDrive = fso.GetDriveName(wscript.ScriptFullName)
    Set compNameFile = fso.CreateTextFile(usbDrive & "\KACE\ComputerName", True)
    End If

    And the only thing I changed in the ApplyComputerName.vbs was the drive it looked for from X:\ to T:\ - DanGreenbrier 9 years ago
 
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