Jump to content

plz help need scriptor


Recommended Posts

i cant script but can somoene help me im dutch so disregard errors i want e script that asks tho change the administrator pasword en name en i have e extra account i want it tho ask tho change the name of account en change the pasword of it also i have e script that asks tho change the Registered Owner/Organization name

ok i found al the things i need here they are

:hello: change owner pc name from this forum

'ChgOwnOrg.vbs - Change Win9x Registered Owner/Organization.

'Modified for Windows XP

Option Explicit

Set ws = WScript.CreateObject("WScript.Shell")

Dim ws, t, p1, p2, p3, p4, p5, n, g, j, h, f, k, cn, cg, cj

Dim itemtype

p1 = "HKLM\Software\Microsoft\Windows NT\CurrentVersion\"

p2 = "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ComputerName\ComputerName\"

p3 = "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\Parameters\"

p4 = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\"

p5 = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\"

n = ws.RegRead(p1 & "RegisteredOwner")

g = ws.RegRead(p1 & "RegisteredOrganization")

j = ws.RegRead(p2 & "ComputerName")

h = ws.RegRead(p3 & "NV Hostname")

f = ws.RegRead(p4 & "ComputerName")

k = ws.RegRead(p5 & "NV Hostname")

t = "Change Utility"

cn = InputBox("Type new Owner and click OK", t, n)

If cn <> "" Then

ws.RegWrite p1 & "RegisteredOwner", cn

End If

cg = InputBox("Type new Organization and click OK.", t, g)

If cg <> "" Then

ws.RegWrite p1 & "RegisteredOrganization", cg

End If

cj = InputBox("Type new Computer name and click OK", t, j)

If cj <> "" Then

ws.RegWrite p2 & "ComputerName", cj

ws.RegWrite p3 & "NV Hostname", cj

ws.RegWrite p4 & "ComputerName", cj

ws.RegWrite p5 & "NV Hostname", cj

End If

:hello: change admin pasword from visualbasicscripthing

Dim strComputer

strComputer = "."

Set objUser = GetObject("WinNT://" & strComputer & "/Administrator, user")

If Err.Number <> 0 Then

MsgBox Now & vbTab & "Error connecting to " & strComputer & " --- " & Err.Description

Err.Clear

ErrorOccurred = True

Else

' Set the password for the account

newPassword = inputbox ("Give new password",,"Create P-word")

objUser.SetPassword newPassword

objUser.SetInfo

If Err.Number <> 0 Then

outFile.writeline Now & vbTab & "Error setting password for " & strComputer & _

"\Administrator" & " --- " & Err.Description

Err.Clear

ErrorOccurred = True

Else

Msgbox Now & vbTab & "Password set for " & strComputer & "\Administrator"

End If

End If

:hello: create new user from visualbasicscripthing

username=inputbox("Iuput user name:")

password=inputbox("Password:")

set a=createobject("wscript.shell")

a.run("%systemroot%\system32\cmd /k net user /add "&username&" "&chr(34)&password&chr(34)&" "&"&exit")

a.run("%systemroot%\system32\cmd /k net localgroup administrators /add "&username&" "&"&exit")

these files are called soon as installation finisch en then asks al the info for new account new pasword for admin new computer name like all the things u stil need tho change on new pc exept drivers then if i forgot somthing plz say so

Edited by spidercop
Link to comment
Share on other sites


every thing works exept for the user maker it dont ad the account tho administrator i got error on this in second batch file that created that user dont exist

username=inputbox("Iuput user name:")

password=inputbox("Password:")

set a=createobject("wscript.shell")

a.run("%systemroot%\system32\cmd /k net user /add "&username&" "&chr(34)&password&chr(34)&" "&"&exit")

a.run("%systemroot%\system32\cmd /k net localgroup administrators /add "&username&" "&"&exit")

this is the vbs script i get the erro with i get error wen it ads the user the local administrators i changed the exit tho pause tho waths the error my ansers tho the questions are username spiderman en pasword evelkenievel so then go en i get this one cmd wiindow say opdracht voltooid other say

Deze groep of gebruiker bestaat niet: spiderman.

Typ NET HELPMSG 3783 voor meer hulp.

Druk op een toets om door te gaan. . .

it says it in dutch in engels it like this this groep or user dont exist

username=inputbox("Iuput user name:")

password=inputbox("Password:")

set a=createobject("wscript.shell")

a.run("%systemroot%\system32\cmd /k net user /add "&username&" "&chr(34)&password&chr(34)&" "&"&exit")

a.run("%systemroot%\system32\cmd /k net localgroup administrators /add "&username&" "&"&exit")

Edited by spidercop
Link to comment
Share on other sites

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...