Open iospoisson opened 7 months ago
You need a standard Windows installation and a non modified environment Here is the normal output of a normal powershell:
PS C:\Users\falco> get-command reg
CommandType Name Version Source
----------- ---- ------- ------
Application reg.exe 10.0.22... C:\WINDOWS\system32\reg.exe
As you see, Powershell has access to the windows path and will find the reg.exe in system32. It is not good enough to use the PowerShell functions for registry adjustments, only system32\reg.exe is able to bypass write restrictions without adding custom permissions to the sound registry keys.
So if you don't have access to system32\reg.exe this tool will not work. It is kind of a security issue that reg.exe is able to bypass the "no admin access, system only" restriction. So very likely that a hardened system with reduced permissions will not have access to system32\reg.exe
How to solve this problem?
You need to tell why your user does not have access to the standard registry edit tool.
You need access to C:\WINDOWS\system32\reg.exe
And your PATH variable needs to be correct.
If you have done these checks and gain access to these system tools, then you can use get-command reg
in powershell to confirm if you have a normal windows installation without restrictions.
If get-command reg
does not work, then you need to get a user with more permissions or you need to fix your environment setup.
I'm still getting this error, not sure what you said, I'm new to this, the PATH variable must be corrected how? And what do you mean by access to C:\WINDOWS\system32\reg.exe
The Script calls "reg" With the help of the global Windows environment variable named "PATH", it looks for a reg.exe in multiple locations. On Windows, reg.exe is a system tool stored at C:\WINDOWS\system32\reg.exe
So you either don't have permissions to use your operating system tools, or you or your administrator did change the PATH variable or restricted your access to reg.exe.
Please ask somebody for personal tech support. I don't want to share any manuals which does touch your system tools, since if followed incorrectly things can break without you knowing how to undo. But I can give you a check to test if your system is a normal or not. You can type the following command into PowerShell to test if your access to reg.exe got fixed:
get-command reg
if everything is fixed on your computer, it will respond with the following output:
PS C:\Users\falco> get-command reg
CommandType Name Version Source
----------- ---- ------- ------
Application reg.exe 10.0.22... C:\WINDOWS\system32\reg.exe
No problem, I've found the solution, thanks anyway.
@laminetrad Was it something about how you run it? If yes, please share it, as long as it doesn't involve changing PATH or system32 :)
It was about adding the right path to the Environment Variables
No problem, I've found the solution, thanks anyway.
HOW FIX?
`The term 'reg' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1