bujo696 Posted December 25, 2005 Posted December 25, 2005 I'm searched any script or appz for what I need, but no such luck...I'm doing an unattended cd (win xp) and I wish that, at final, a simple app change the password for the main (admininstrator) account.I tryed something in VBS:Set WshShell = Wscript.CreateObject("Wscript.Shell")function CambiarPass(machine)wshshell.run "Net User Administrador" & " " & machine,0end functionmsgbox "Cambiar Contraseña de Windows XP SP 2 uE V4" & vbnewline & vbnewline & "Para su mayor seguridad le recomendamos que actualice la contraseña de Windows XP" & vbnewline & vbnewline & vbnewline & vbnewline & "http://www.windowsue.com", vbokonly + vbquestioncall ChangePassSub ChangePass()machine = inputbox ("Importante no usar caracteres especiales y recuerda si usas minúsculas o mayúsculas." & vbnewline & vbnewline & "Por favor indica la nueva contraseña:" & vbnewline & vbnewline & _"", "Cambiar contraseña")if machine = "" thenmsgbox "¡Contraseña invalida!"call ChangePasselseCambiarPassend ifEnd SubBut it seems it doesn't work...Can anybody help me?Regards,Bj
Doc Symbiosis Posted January 6, 2006 Posted January 6, 2006 what exactly happens, when you run the script?
Yzöwl Posted January 11, 2006 Posted January 11, 2006 (edited) How about a compiled batch file![Edit]Just to qualify the post a little, this probably only works in English language versions and may not work pre-XP.Basically I made it for those occasions where the Local Administrator Name may have been changed. It therefore doesn't just useNET USER Administrator Pa5Sw0rdIt attempts to get the correct Local Administrator Name programatically and then does a little checking on the newly supplied password before setting it.[/Edit]RootPass.zip Edited January 12, 2006 by Yzöwl
IcemanND Posted January 12, 2006 Posted January 12, 2006 Here try this, replace 'ComputerName' and 'UserName' with the appropriate names and 'NewPassword' with the new password, if using a variable for the password then remove the double quotes also.Also don't change the case of the 'WinNT' or it won't work.Set objUser = GetObject("WinNT://ComputerName/UserName")objUser.SetPassword("NewPassword")
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now