|
-
Mar 1st, 2010, 11:54 AM
#1
Thread Starter
Lively Member
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 >
-
Mar 1st, 2010, 11:56 AM
#2
Re: How to reset Windows Seven password
How about using the tools provided by Windows 7?
-
Mar 1st, 2010, 12:07 PM
#3
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
-
Mar 1st, 2010, 01:53 PM
#4
Thread Starter
Lively Member
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 >
-
Mar 1st, 2010, 09:23 PM
#5
Re: How to reset Windows Seven password
The system cannot find the file specified
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Mar 1st, 2010, 11:11 PM
#6
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:
Dim p As New Process p.StartInfo.Arguments = "<arguments you would type into a command window>" p.StartInfo.FileName = "cmd" p.Start() 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
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Mar 2nd, 2010, 01:11 AM
#7
Thread Starter
Lively Member
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 >
-
Mar 2nd, 2010, 01:27 AM
#8
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
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Mar 2nd, 2010, 01:32 AM
#9
Thread Starter
Lively Member
Re: How to reset Windows Seven password
vb Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim myReg As String = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "RegisteredOwner", Nothing) 'MsgBox(myReg) Dim p As New Process p.StartInfo.Arguments = "net user " & myReg & " *" p.StartInfo.FileName = "cmd" p.Start() p.Dispose() End Sub
< advertising link removed by moderator >
-
Mar 2nd, 2010, 01:47 AM
#10
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
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Mar 2nd, 2010, 01:57 AM
#11
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
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Mar 2nd, 2010, 01:57 AM
#12
Thread Starter
Lively Member
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 >
-
Mar 2nd, 2010, 07:11 AM
#13
Fanatic Member
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.
-
Mar 2nd, 2010, 07:49 AM
#14
Thread Starter
Lively Member
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 >
-
Mar 2nd, 2010, 12:47 PM
#15
Thread Starter
Lively Member
Re: How to reset Windows Seven password
< advertising link removed by moderator >
-
Mar 2nd, 2010, 01:21 PM
#16
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
 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|