Rename remote computers with Visual basic?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lafayette7674
    New Member
    • Feb 2012
    • 2

    Rename remote computers with Visual basic?

    just trying to get this to function. its almost there. I dont know what the hold up is. I have scoured the internet and come this far. I am at a loss. thanks in advance.

    If Wscript.argumen ts.length =0 Then
    Set Objshell = CreateObject("S hell.Applicatio n")
    objshell.shelle xecute "wscript.ex e", Chr(34) & _
    wscript.scriptf ullname & Chr(34) & " uac", "", "runas", 1
    Else

    Dim computername
    computername=In putBox("Enter your computer name:")
    Dim newname
    newname=InputBo x("Enter the newname")

    Call WSHShell.Run("c md.exe /K netdom renamecomputer " & computername & " /newname:" & newname & " /userd:domain\us er /passwordd:* /usero:local\adm in /passwordo:* /force /reboot

    End if/
  • lafayette7674
    New Member
    • Feb 2012
    • 2

    #2
    It restricted me from going into details on all the time I spent trying to get this to work. the only thing i can think of is for someone to give me the exact syntax of:

    Call WSHShell.Run("c md.exe /K netdom renamecomputer " & computername & " /newname:" & newname & " /userd:domain\us er /passwordd:* /usero:local\adm in /passwordo:* /force /reboot

    is it domain.upper.to p\domainadmin or alias\domain admin? Can i type local\admin or does it have to be computername\ad min?

    Comment

    Working...