need help regarding vbs scripting - TechRepublic
Question
December 11, 2007 at 08:50 PM
nxsubbeh

need help regarding vbs scripting

by nxsubbeh . Updated 18 years, 7 months ago

Really need some help here .. i would like to ask that whether is it possible to auto create the following registry(pc name) using vbs script is like something
PC NAME:nxsubbeh1
PC NAME:nxsubbeh2
and so on
cause currently im using the *IF* and *THEN*
and i need the registry in the same folder wit it too ..
[
strUserIn = InputBox(“PC NUMBER”)
set oShell = CreateObject(“WScript.Shell”)
if strUserIn = 1 then
oShell.run”regedit /s 1.reg”
elseif strUserIn = 2 then
oShell.run”regedit /s 2.reg”
elseif strUserIn = 3 then
oShell.run”regedit /s 3.reg”
end if
]

[
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ComputerName]

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ComputerName\ComputerName]
“ComputerName”=”nxsubbeh”
]

is it possible by using the vbs script i can auto create the registry.. PLEASE REALLY NEED HELP.. THANKS..

This discussion is locked

All Comments