0

There's a program called MBRfix by Kåre Smith in Norway. It must be run with ADMIN privileges, and it requires multiple parameters... so, a user cannot simply right-click on it and choose "Run as administrator"!

In order to use this program to help very inept users (like many old, first-time computer users with Windows 10, or 8 or 7), I need to create a batch/cmd file for them to simply click on and run; or at the most, right-click on and choose "Run as administrator". But if I do that with this batch file:

@echo off
echo.
MBRFIX.EXE /drive 0 savembr Disk0MBR
echo.
echo.
pause

It always comes back with: " 'MBRFIX.EXE' is not recognized as an internal or external command, operable program or batch file." (I've used both .bat and .cmd files, and in fact, it doesn't matter if you have any parameters/arguments at all, Win 10 simply will not run any program as ADMIN from inside a batch file like this!)

I am working on coding my own program to open the Win UAC and ask user to run as ADMIN with built-in commands... But that will be very tedious compared to using Kåre's ready to go program.

The reason neither "runas" nor "psexec" can be used is: They both require an ADMIN account with a login password... Well, my PC does not have one (on purpose) and neither do many other users who've had their PCs set up with good security (or, they were never set up as ADMIN).

So, is this possible? Or must we either school the inept user on how to open an ADMIN command prompt window (or PowerShell window) and use specific commands to navigate and parameters from a webpage or email in order to finally use mbrfix.

Dan, TheStarman.

  • When you run a script as Administrator, that script starts in `%WINDIR%\System32` instead of the current directory. To resolve this, either add `cd "%~dp0"` to your script to move to where the script (and presumably `mbrfix.exe`) is currently located, or just open the command prompt as Administrator by typing `cmd` into the Start Menu and then clicking "Run as Administrator" then running `mbrfix.exe` there. – SomethingDark Feb 02 '21 at 02:41
  • The error you're getting has nothing to do with admin/non-admin. Search for that error message in the search box at the top of this page. But the solution you're trying won''t work anyway, because the command window where it is being executed would have to be opened as an admin in the first place. You can't just pretend that the need for admin privileges doesn't exist. And why in the world would you need to allow a non-admin user to run MBRFix in the first place? It should be run by someone who knows what they're doing, not some user that isn't even trusted to be an admin on the computer. – Ken White Feb 02 '21 at 02:44
  • Inept users are not expecting to have the MBR and partition data saved to a filename without an extension, so I would advise that you give it one, e.g. `@"%~dp0MbrFix.exe" /drive 0 savembr "%~dp0Backup_MBR_0.bin"` – Compo Feb 02 '21 at 04:29
  • Thank you "Something Dark" and Ken White for your replies! Makes perfect sense now... As you stated, I should have been looking for the error message! Sorry to have wasted space with this question. – TheStarman Feb 02 '21 at 19:55
  • For Ken and "Compo": As: "... to help very inept users..." implied, I used to help many via email by having them run batch files and send me results! Now, no longer possible; except for the rare Win XP users. And Windows 10 sometimes fails to boot for inexplicable reasons anyway; even running the repair cycles cannot always fix it (and I mean on perfectly physically healthy drives). So, I'm mostly helping people recover lost data these days, because they do not take the best advice possible: BACK-UP all your important data to another disk/drive/cloud/whatever; and have TWO back-ups! – TheStarman Feb 02 '21 at 19:57

0 Answers0