clariceo0 Posted May 11, 2016 Share Posted May 11, 2016 Recently, I am interested to build a windows app to reset Windows login password as a side off project. I am still a newbie in programming so i am not able to build the app from scratch. Is there any open source project i could learn from on this? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 11, 2016 Moderators Share Posted May 11, 2016 Hi, @clariceo0, welcome to the forum. A couple of questions to help us help you: Are you looking to change the password from within the machine itself or remotely? Are you doing this on domain computers, or just local users on local PCs? Are you wanting to allow users to do this themselves (something sitting on the desktop they can click on), and if so do they have administrative rights to do so? The more info you can provide us with, the better we can assist you, so we're not throwing out suggestions that may not work for your situation. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
clariceo0 Posted May 12, 2016 Author Share Posted May 12, 2016 12 hours ago, JLogan3o13 said: Hi, @clariceo0, welcome to the forum. A couple of questions to help us help you: Are you looking to change the password from within the machine itself or remotely? Are you doing this on domain computers, or just local users on local PCs? Are you wanting to allow users to do this themselves (something sitting on the desktop they can click on), and if so do they have administrative rights to do so? The more info you can provide us with, the better we can assist you, so we're not throwing out suggestions that may not work for your situation. thanks for the great suggestion. I just want to change or reset the password of local account. I will write a GUI client for this to help normal users without much technical knowledge. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 12, 2016 Moderators Share Posted May 12, 2016 (edited) @clariceo0 Usually we follow more of a "teach a man to fish" motto rather than just handing folks scripts, but I had this one lying about. It should give you an idea how to proceed anyway; you will probably need to modify to your needs. Also you'll want to test heavily; it is an older script which I have not tested on Windows 10. Let me know if you have any questions: expandcollapse popup#include <EditConstants.au3> #include <GUIConstantsEx.au3> Local $sUserName, $sPassword $hGUI = GUICreate("Reset Local Password", 300, 300) GUISetState(@SW_SHOW) GUISetFont(11, 400, Default, "Arial") $lblUserName = GUICtrlCreateLabel("Username", 115, 10, 65, 30) $lblPassword = GUICtrlCreateLabel("Choose New Password", 75, 90, 150, 30) $lblVerify = GUICtrlCreateLabel("Verify New Password", 75, 170, 150, 30) $inpUserName = GUICtrlCreateInput(@UserName, 10, 40, 280, 30, $ES_CENTER) $inpPassword = GUICtrlCreateInput("", 10, 120, 280, 30, $ES_PASSWORD) $inpVerify = GUICtrlCreateInput("", 10, 200, 280, 30, $ES_PASSWORD) $btnGo = GUICtrlCreateButton("Change Password", 10, 250, 125, 35) $btnClose = GUICtrlCreateButton("Exit", 165, 250, 125, 35) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $btnClose ExitLoop Case $btnGo If GUICtrlRead($inpPassword) == GUICtrlRead($inpVerify) Then $sUserName = GUICtrlRead($inpUserName) $sPassword = GUICtrlRead($inpPassword) _changePW($sUserName, $sPassword) Else MsgBox(0, "Reset Local Password", "Passwords do not match!") EndIf EndSwitch WEnd Func _changePW($UserName, $Password) $oUser = ObjGet("WinNT://" & @ComputerName & "/" & $UserName) If IsObj($oUser) Then $oUser.SetPassword($Password) $oUser.SetInfo EndIf EndFunc Edit: Also, although you posted in a C++ forum you didn't specify that you need this done in C++/C. Are you just looking to get the job done, or do you have a language requirement that it needs to be coded in? Edited May 12, 2016 by JLogan3o13 clariceo0 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
clariceo0 Posted May 13, 2016 Author Share Posted May 13, 2016 (edited) @JLogan3o13 thanks for the help. I will figure out the code myself and port it into C++. so i can build a GUI with QT. I find a good example of the program called UUkeys. Here is the tutorial on how to reset windows password. that is exactly what i am looking for. Edited October 26, 2016 by clariceo0 Link to comment Share on other sites More sharing options...
kenuard Posted June 3, 2016 Share Posted June 3, 2016 (edited) On 12/05/2016 at 7:40 AM, Aquarium said: On 11/05/2016 at 3:29 AM, clariceo0 said: Recently, I am interested to build a windows app to reset Windows login password as a side off project. I am still a newbie in programming so i am not able to build the app from scratch. Is there any open source project i could learn from on this? You can use the api fuction NetUserChangePassword. expandcollapse popup#ifndef UNICODE #define UNICODE #endif #pragma comment(lib, "netapi32.lib") #include <stdio.h> #include <windows.h> #include <lm.h> int wmain(int argc, wchar_t *argv[]) { DWORD dwError = 0; NET_API_STATUS nStatus; // // All parameters are required. // if (argc != 5) { fwprintf(stderr, L"Usage: %s \\\\ServerName UserName OldPassword NewPassword\n", argv[0]); exit(1); } // // Call the NetUserChangePassword function. // nStatus = NetUserChangePassword(argv[1], argv[2], argv[3], argv[4]); // // If the call succeeds, inform the user. // if (nStatus == NERR_Success) fwprintf(stderr, L"User password has been changed successfully\n"); // // Otherwise, print the system error. // else fprintf(stderr, "A system error has occurred: %d\n", nStatus); return 0; } Edited June 3, 2016 by Melba23 Removed ad link in quote Link to comment Share on other sites More sharing options...
Qaskeer Posted September 29, 2017 Share Posted September 29, 2017 (edited) On 2016/5/13 at 9:19 AM, clariceo0 said: @JLogan3o13 thanks for the help. I will figure out the code myself and port it into C++. so i can build a GUI with QT. I find a good example of the program called UUkeys. Here is the tutorial on how to reset Windows password. that is exactly what i am looking for. If I could see this post earlier, my data recovery program wouldn't be that messy , I reinstalled an operating system , but I'm a beginner, Edited October 12, 2017 by Qaskeer Link to comment Share on other sites More sharing options...
Eakkery Posted October 16, 2017 Share Posted October 16, 2017 (edited) On 2017/9/29 at 2:51 PM, Qaskeer said: If I could see this post earlier, my data recovery program wouldn't be that messy , I reinstalled an operating system , but I'm a beginner, https://www.tunesbro.com/reset-windows-7-password.html I am so sorry to hear that , but you are not the only one . more and more beginners will reinstall the system when they encounter this problem , Actually, we can use some free ways to reset Widnows password , Edited October 18, 2017 by Eakkery Link to comment Share on other sites More sharing options...
Developers Jos Posted July 8, 2019 Developers Share Posted July 8, 2019 32 minutes ago, Seemyu said: This problem still occurs today,but reset password from Windows is not hard. This is now the second post that is totally useless: STOP that and only post when you have a question or something meaningful to say! Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now