Jump to content

Recommended Posts

Posted

Hello,

how making an unattended dynamic file.

I'm trying to make an unattended dynamic file.

To change the name of machine dynamically each installation has.

thank you.


Posted

I dont have the code with me but it is pretty simple. What u have to decide/tell is in what environment your are creating the file in (DOS or WinPE -16/32)?

If you are in Win32 mode, u can use the nice feature of vb scripting which would function under WinPE, but in dos u r limited to pipe the command to a certain file.

I will get back to u once I get home, have the darn things back home on CD...

I would recommend u running the creation in WinPe if u have to option to do that. Then u can have a much nicer GUI and so on to look @ while creating the answer file.

Best Regards

Tha Sausage Eater

Posted (edited)

Here is a vbs script that I wrote. You should execute it during your clean up cmd and it will prompt the user for

User Name

Company Name

Computer Name

Option Explicit

Set ws = WScript.CreateObject("WScript.Shell")
Dim ws, p1, p2, n, g, o, t, cn, cg, co

p1 = "HKLM\Software\Microsoft\Windows NT\CurrentVersion\"
p2 = "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\"

n = ws.RegRead(p1 & "RegisteredOwner")
g = ws.RegRead(p1 & "RegisteredOrganization")
o = ws.RegRead(p2 & "ComputerName")
t = "Draco Networks - Personal Info & Computer Name"

cn = InputBox("Enter Your Full Name", t, n)
If cn <> "" Then
 ws.RegWrite p1 & "RegisteredOwner", cn
End If

cg = InputBox("Enter Your Company Name", t, g)
If cg <> "" Then
 ws.RegWrite p1 & "RegisteredOrganization", cg
End If

co = InputBox("Enter Computer Name", t, o)
If co <> "" Then
 ws.RegWrite p2 & "ComputerName", co
End If

Just copy it into a text file and name it ID.vbs

Edited by Gee

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...