Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

serial number as computername during unattended

Featured Replies

I have received so much useful info from this site that I though I would post something that I hope is useful for someone. :)

I have all COmpaq computers and wanted to name them the serial number during an unattended setup to keep uniqueness. I placed this vbscript in the runonceex and it places the serial number in the sysprep.inf as the computername. The original syspre.inf has a computername of #### which will be replaced with the serial number.

'prep

dim Bios, BiosSerial, objFSO, objTextFile

'Const ForReading = 1, ForWriting = 2, ForAppending = 8

'get serial number

for each Bios in GetObject("winmgmts:").InstancesOf ("win32_bios")

BiosSerial = Bios.SerialNumber

exit for

next

'open file and read into memory, replace #### with serialnumber

Set objFSO = CreateObject("Scripting.FileSystemObject")

r="c:\sysprep\sysprep.inf"

Set objTextFile = objFSO.OpenTextFile(r,1)

s = objtextfile.readall

x = "####"

snew = Replace(s,x,biosserial)

objTextFile.close

set objtextfile=nothing

'delete old file

objfso.DeleteFile r, true

'write new file

set objTextFile = objfso.CreateTextFile®

objTextFile.Write snew

objTextFile.Close

set objTextFile = nothing

'messagebox

'msgbox "Computername changed to " + BiosSerial + "...", yes

Mike Niccum


Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.