Bart59 Posted August 19, 2005 Share Posted August 19, 2005 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. Link to comment Share on other sites More sharing options...
Br4tt3 Posted August 19, 2005 Share Posted August 19, 2005 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 RegardsTha Sausage Eater Link to comment Share on other sites More sharing options...
Gee Posted August 20, 2005 Share Posted August 20, 2005 (edited) Here is a vbs script that I wrote. You should execute it during your clean up cmd and it will prompt the user forUser NameCompany NameComputer NameOption ExplicitSet ws = WScript.CreateObject("WScript.Shell")Dim ws, p1, p2, n, g, o, t, cn, cg, cop1 = "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", cnEnd Ifcg = InputBox("Enter Your Company Name", t, g)If cg <> "" Then ws.RegWrite p1 & "RegisteredOrganization", cgEnd Ifco = InputBox("Enter Computer Name", t, o)If co <> "" Then ws.RegWrite p2 & "ComputerName", coEnd IfJust copy it into a text file and name it ID.vbs Edited August 20, 2005 by Gee Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now