DriveAlive bat startup

teckneeculler

Member
Power User
VIP
Local time
5:03 AM
Messages
512
I have a 6TB USB storage drive.
Last April I asked you guys how to best utilize a small free app called DriveAlive to startup and shutdown that drive.

(DriveAlive, together with many other great little apps, can be found here: Miles Ahead's Windows Downloads)

TheDeerDude replied:

I'm thinking, a batch file would do the job - located in the same directory as drivealive, but not neccessarily.
That, and maybe task scheduler would help you accomplish what you're aiming for?

Does drivealive run under its own process? e.g. drivealive.exe?

You could have

Code:
@echo off
drivealive x:
to start it, and use taskkill to end it

Code:
@echo off
   taskkill /f /im drivealive.exe

These bats worked fine until a recent system crash and rebuild, forcing me to reinstall everything, including DriveAlive.

I have it sorta working again, but there's a small oddity I'd like to fix. On first run of the Start bat, an empty command window pops up. Unless I 'x' it shut, it remains there for five minutes and then disappears.

I've tried adding exit and cls to the command but neither of those shut the box.

Suggestions welcomed.

PS: DriveAlive works by writing 'drive_alive_dummy.txt' to the root of the 6TB drive. Five minutes later it deletes the text file. Five minutes after that it writes 'drive_alive_dummy.txt' again. And so on, ad infinitum, unless the Stop bat is run. The command line box disappears after five minutes, apparently coinciding with the removal of the first textfile, and doesn't appear again.
PPS: When the Stop bat is run, there's no popup command box.
 
Last edited:

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
My build
OS
Win7 Ultimate SP1
CPU
Intel Core i5 9400 Coffee Lake 14nm
Motherboard
Asus Prime H310M-E R2.0 (LGA1151)
Memory
16G DDR4
Graphics Card(s)
NVidia GeForce GTX 960
Sound Card
Realtek High Definition Audio (mobo)
Monitor(s) Displays
Asus PA248 24" 16:10 format
Screen Resolution
1920x1200@59Hz
Hard Drives
1863GB Seagate ST2000DM
3726GB Seagate ST4000DM
1863GB Seagate ST2000DM
6TB Seagate
465GB NVMe Samsung SSD 970
PSU
750G2
Case
Tower
Cooling
Standard
Keyboard
USB
Mouse
USB
Internet Speed
920Mbs/480Mbs
Antivirus
Malwarebytes
Browser
Firefox
I have it sorta working again, but there's a small oddity I'd like to fix. On first run of the Start bat, an empty command window pops up. Unless I 'x' it shut, it remains there for five minutes and then disappears.

I've tried adding exit and cls to the command but neither of those shut the box.

[1] Is that all of the .bat code?
[2] What is shown in the Title of the cmd Window that pops up?
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Fujitsu LIFEBOOK
OS
Win 7 HP SP1 64-bit Vista HB SP2 32-bit Linux Mint 18.3
CPU
Intel(R) Pentium(R) CPU P6200 @ 2.13GHz
Motherboard
FUJITSU FJNBB06
Memory
4.00 GB
Graphics Card(s)
Intel(R) Graphics Media Accelerator HD
Sound Card
[1] Realtek High Definition Audio [2] Intel(R) Display Audio
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 59 Hz
Hard Drives
TOSHIBA MK5076GSX
Antivirus
AVG FREE
Thanks, Paul Black.
[1] Well, yeah. That's what the TheDeerDude said to do.
[2] And the title of the command box is 'start.bat - Shortcut'

The text in the start .bat is:

@echo off
DriveAlive M:

M being the letter I allocated to my movies USB hdd.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
My build
OS
Win7 Ultimate SP1
CPU
Intel Core i5 9400 Coffee Lake 14nm
Motherboard
Asus Prime H310M-E R2.0 (LGA1151)
Memory
16G DDR4
Graphics Card(s)
NVidia GeForce GTX 960
Sound Card
Realtek High Definition Audio (mobo)
Monitor(s) Displays
Asus PA248 24" 16:10 format
Screen Resolution
1920x1200@59Hz
Hard Drives
1863GB Seagate ST2000DM
3726GB Seagate ST4000DM
1863GB Seagate ST2000DM
6TB Seagate
465GB NVMe Samsung SSD 970
PSU
750G2
Case
Tower
Cooling
Standard
Keyboard
USB
Mouse
USB
Internet Speed
920Mbs/480Mbs
Antivirus
Malwarebytes
Browser
Firefox
Back
Top