ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

Simple: Desktop shortcut/script to restart to USB drive

(1/1)

nkormanik:
What should be a piece of cake often seems ridiculously hard.

Restart computer, and open to a specific USB thumb drive.

Create script/batch file to accomplish this.  Or even a little program.

Any thoughts greatly appreciated.

Nicholas Kormanik

KynloStephen66515:

--- ---@echo off

rem **SET YOUR DRIVE LETTER**
set /p usb_drive_letter=Enter the letter of the USB drive:

rem **THIS CHECKS IF IT EXISTS**
if not exist "%usb_drive_letter%:\" (
    echo The USB drive is not present.
    pause
    exit /b
)

rem **THIS REBOOTS THE PC TO THE USB DRIVE**
shutdown /r /t 0 /f /fw /s



Not tested because I have no USB boot drives to hand, but it should work.

Use at your own risk

I accept no warantee blah blah blah, basically if you run it and something goes tits up, don't blame me.

You should always check code given to you by anybody on the internet for inconsistencies, errors, or anything dangerous before running it yourself.

publicdomain:
Hi Nick! I'm spinning-up a quickie drive letter selection GUI + registry edit project inspired by this :Thmbsup:

Repo @ https://github.com/publicdomain/driveup

nkormanik:
Goodness, Vic!  Am I in heaven, or what?!

"Open Windows Explorer to a specific drive on next restart."

More precisely, BOOT UP to that particular drive on next restart.

How people presently do this:
-- via bios setting
-- pressing a key at a particular point during startup
-- via Windows settings, restart to particular device

I think the best idea is through a desktop shortcut, if possible.

Thanks to KynloStephen66515 as well!

By the way, I really like Ventoy on a flash drive to boot up to -- packed with relevant .iso files to then load as desired, such as Aronis, WinPE, etc.  Wonderful technology.

https://www.ventoy.net/en/index.html

It's getting the computer to easily reboot to that flash drive that's the challenge.


publicdomain:
Hello again Nick, please go with the shutdown command in your UEFI system.

The tool I have in mind is inspired by your request yet isn't the same (just edited it up).

(Going to list you as the inspiration for the resulting "DriveUp" program BTW :Thmbsup:)

Navigation

[0] Message Index

Go to full version