Results 1 to 16 of 16

Thread: How to reset Windows Seven password

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2009
    Posts
    76

    How to reset Windows Seven password

    I am looking forward to reset password of Windows Seven by my app.

    Using command

    Code:
    net user user_name *
    But I don't know how to run this command

    Code:
    process.start("net user" & user_name & "*")
    gives error.


    So how to do that or is there any other direct command which can change/reset windows password.
    < advertising link removed by moderator >

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: How to reset Windows Seven password

    How about using the tools provided by Windows 7?

  3. #3
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: How to reset Windows Seven password

    process.start("net user" & user_name & "*")
    Try this with appropriate spaces...

    Code:
    process.start("net user " & user_name & " *")
    Note: I am assuming that you are the administrator....
    Last edited by Siddharth Rout; Mar 1st, 2010 at 12:11 PM.
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Sep 2009
    Posts
    76

    Re: How to reset Windows Seven password

    Nope it doesn't work Win32Exception program doesn't run

    any other ideas


    System.ComponentModel.Win32Exception was unhandled
    ErrorCode=-2147467259
    Message="The system cannot find the file specified"
    NativeErrorCode=2
    Source="System"
    StackTrace:
    at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start(String fileName) at _1Click_Reset.Form1.Button1_Click(Object sender, EventArgs e) in J:\Users\Mad Geek\Documents\Visual Studio 2008\Projects\1Click Reset\1Click Reset\Form1.vb:line 14 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(ApplicationContext context) at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) at _1Click_Reset.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()
    InnerException:
    < advertising link removed by moderator >

  5. #5
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: How to reset Windows Seven password

    The system cannot find the file specified
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  6. #6
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: How to reset Windows Seven password

    The first command you're sending, isn't a command. It's supposed to be the file name. So when you send, "net user", your application is looking for something to launch either in the SYSTEM PATH or the path of your application, called "net user."

    Chances are, you want to send this command with the command window, correct?

    If so, you'll need to do something like this:


    vb Code:
    1. Dim p As New Process
    2. p.StartInfo.Arguments = "<arguments you would type into a command window>"
    3. p.StartInfo.FileName = "cmd"
    4. p.Start()
    5. p.Dispose()

    Normally, you'd also need to specify the FilePath, but since the command window is located in the SYSTEM PATH, that isn't needed.

    Also, as previously stated, you need to be have administrator privileges in order to reset a windows password. Also, process needs to be elevated in order for net user to work.

    In order to elevate the process, you'll need one more line of code. It will be a StartInfo object called Verb. You'll need to pass a string to it called runas. I'll leave it up to you to add it in there.
    Last edited by weirddemon; Mar 1st, 2010 at 11:22 PM.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Sep 2009
    Posts
    76

    Re: How to reset Windows Seven password

    @weirddemon

    But this one also doesn't help all it does is it opens Command Prompt and thats it, no argument were passed using this method.
    < advertising link removed by moderator >

  8. #8
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: How to reset Windows Seven password

    Then you're doing something wrong.

    Post the exact code you're using.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Sep 2009
    Posts
    76

    Re: How to reset Windows Seven password

    vb Code:
    1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    2.  
    3.  
    4.         Dim myReg As String = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "RegisteredOwner", Nothing)
    5.         'MsgBox(myReg)
    6.  
    7.         Dim p As New Process
    8.         p.StartInfo.Arguments = "net user " & myReg & " *"
    9.         p.StartInfo.FileName = "cmd"
    10.         p.Start()
    11.         p.Dispose()
    12.  
    13.      
    14.    End Sub
    < advertising link removed by moderator >

  10. #10
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: How to reset Windows Seven password

    Well, first, if you really want to use the registry to get the current user, you can. But VB .NET provides a method for that: Environment.Username.

    Second, as I mentioned, you need to elevate the User permissions. But, I'm only guessing about that being the issue.

    So, I need to know what's showing up in the command box. Nothing at all? No text whatsoever?
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  11. #11
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: How to reset Windows Seven password

    Actually, I looked into it, and it's not working... which is odd. There might be an an alternate method used for the command window. I'm looking into it.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  12. #12

    Thread Starter
    Lively Member
    Join Date
    Sep 2009
    Posts
    76

    Re: How to reset Windows Seven password

    Here is the text

    Microsoft Windows [Version 6.1.7600]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.

    J:\Users\Mad Geek\Documents\Visual Studio 2008\Projects\1Click Reset\1Click Rese
    t\bin\Debug>
    Yeah I am too looking for that thanks for helping me
    < advertising link removed by moderator >

  13. #13
    Fanatic Member Megalith's Avatar
    Join Date
    Oct 2006
    Location
    Secret location in the UK
    Posts
    879

    Re: How to reset Windows Seven password

    curious why you would reset the windows 7 password? i can think of 2 reasons:- your password is changing (a virus perhaps?) or you have a validation issue with your license.
    If debugging is the process of removing bugs, then programming must be the process of putting them in.

  14. #14

    Thread Starter
    Lively Member
    Join Date
    Sep 2009
    Posts
    76

    Re: How to reset Windows Seven password

    ^ neither of the above two I am creating an application which give user the flexibility to reset password in 1 click.
    < advertising link removed by moderator >

  15. #15

    Thread Starter
    Lively Member
    Join Date
    Sep 2009
    Posts
    76

    Re: How to reset Windows Seven password

    any ideas
    < advertising link removed by moderator >

  16. #16
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: How to reset Windows Seven password

    I'm thinking you'll need to use SendInput. In which case, you'll need to use RedirectSnedInput from the StartInfo object.

    I don't have time to look at it, but if I do tonight, I will.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width