Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: changing passwords wntChgPswd n3ChgPassword n4ChgPassword
I cannot see any means of changing the password.
AddExtender(... ErrorMode(@off) ; See cautions in manual LastError() n3Attach(... err=LastError() ErrorMode(@CANCEL) ; NEVER leave cancel disabled long if err==223 ;Expired pswd etc. endif
Use n3ChgPassword to change it. You may need an updated version of WinBatch (at least 96F?). Download a new copy and try it out.
In the DOS Netware client, this is set in NET.CFG (for Win3.x). In Win95 and NT, it's set in the properties for the Netware client via Control Panel, and is stored in the registry.
So make sure that the userid you're plugging into n4ChgPassword matches the correct context that is returned from n4GetContext.
FFFFFD63 (NWDSChangeObjectPassword)Suggestions?
Maybe try n4SetContext first.
Here are the 2 lines in question:
DllCall("c:\windows\system\mpr.dll", void:"PwdChangePasswordA", lpstr:"MSNP32", lpnull, long:0, long:0) SendKey(`oldpassword{TAB}newpassword{TAB}newpassword{ENTER}{ENTER}`)I would like to use a dialog box that I've created to ask the user for the old password and new password, assign their responses to variables then use the value of those variables as the input for "OldPassword" and "NewPasword" in the part of the program that you helped me with. The variables that I'm using in the dialog box are; PW_oldpw, PW_newpw, and PW_repw. Is there a way to use the value of these variables in the "SendKeysTo" section of this program?
Or, keep the script as it is and pass the information as additional parameters in the Run statement, and then these parameters will be used in the Sendkeysto section as param2 and param3.
Here's what I mean:
if param0!=0 SendKeysTo("~Change Pass",`%param1%{TAB}%param2%{TAB}%param2%{TAB}{ENTER}`) exit endif while 1 MyDialogFormat=`WWWDLGED,5.0` MyDialogCaption=`Password Box` MyDialogX=16 MyDialogY=32 MyDialogWidth=200 MyDialogHeight=129 MyDialogNumControls=8 MyDialog01=`114,28,64,DEFAULT,EDITBOX,PW_oldpw,""` MyDialog02=`114,46,64,DEFAULT,EDITBOX,PW_newpw,""` MyDialog03=`114,64,64,DEFAULT,EDITBOX,PW_RePW,""` MyDialog04=`34,96,64,DEFAULT,PUSHBUTTON,DEFAULT,"OK",1` MyDialog05=`116,98,64,DEFAULT,PUSHBUTTON,DEFAULT,"Cancel",0` MyDialog06=`34,28,64,DEFAULT,STATICTEXT,DEFAULT,"Old Password"` MyDialog07=`34,48,64,DEFAULT,STATICTEXT,DEFAULT,"New Password"` MyDialog08=`34,64,76,DEFAULT,STATICTEXT,DEFAULT,"Retype New Password"` ButtonPushed=Dialog("MyDialog") if PW_newpw != PW_RePW Message("Ooopsie","New passwords do not match. Try again") else break endif endwhile moi=IntControl(1004,0,0,0,0) Run(WinExeName(""),strcat(moi, " ", PW_oldpw, " ", PW_newpw) ) DllCall("c:\windows\system\mpr.dll", void:"PwdChangePasswordA",lpstr:"MSNP32", lpnull, long:0, long:0)
Article ID: W13588
Filename: Changing passwords in Netware and n4ChgPassword.txt
File Created: 1999:04:15:16:55:02
Last Updated: 1999:04:15:16:55:02