1.

Solve : Things to Program?

Answer»

Maybe I was too brief.

Code: [Select]::Devcon_Reboot.bat
::@echo off
C:\"Program Files (X86)"\O2Micro\Oz600\Devcon Reboot Code: [Select]shutdown /r

Code: [Select]REM this one saves your applications
shutdown /g
@Lemonilla
I was trying for something more esoteric just for fun. Your solutions are more 'real world'. Hat tip! Quote from: Ocalabob on JUNE 14, 2013, 07:08:23 PM

@Salmon Trout
Batch file using WIN 7.

Code: [Select]C:\"Program Files (x86)"\O2Micro\Oz600\Devcon Reboot
foxidrive?

Devcon is a Microsoft COMMAND line utility that is not a standard part of Windows; you have to download it. It is a developer tool, a command line EQUIVALENT of Device Manager, and I should think that used carelessly by someone with LITTLE knowledge or sense of responsibility it could seriously disrupt a computer. However you can reboot the computer with no need for extras in one line like this:

Code: [Select]@shutdown /r /t X
where X is the number of seconds you want to wait before rebooting, 0 (zero) being immediately.
beaten by page 2 Quote from: Ocalabob on June 14, 2013, 07:08:23 PM
@Salmon Trout
Batch file using WIN 7.

Code: [Select]C:\"Program Files (x86)"\O2Micro\Oz600\Devcon Reboot
foxidrive?
Why wouldn't you just use the SHUTDOWN command.Quote from: Squashman on June 15, 2013, 05:15:19 AM
Why wouldn't you just use the SHUTDOWN command.

Welcome to the chorus...
Code: [Select]::Devcon.exe from microsoft
@echo off
Devcon Reboot
There wouldn't have been any comment if the path wasn't there and the point it was from Microsoft was made.

After all, this thread is about figuring out different ways to write batch files...



Discussion

No Comment Found