Created
July 22, 2016 17:32
-
-
Save syneart/2c2a72732b7b4b457cbb0a52966dd72e to your computer and use it in GitHub Desktop.
Lazy FullScreen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF&mode con cols=15 lines=1 | |
SET TMP_FILE=%tmp%\cm.bat | |
SET FILE=%1 | |
SET FILE_EXT=%~x1 | |
IF NOT "%~s0"=="%TMP_FILE%" ( | |
COPY %0 %TMP_FILE% 1>nul 2>&1 | |
start/min %TMP_FILE% %FILE% | |
EXIT | |
) | |
SET POWERPNT_EXE_PATH="C:\Program Files\Microsoft Office\Office15\POWERPNT.EXE" | |
SET AcroRd32_EXE_PATH="C:\Program Files\Adobe\Acrobat Reader DC\Reader\AcroRd32.EXE" | |
SET wmplayer_EXE_PATH="C:\Program Files\Windows Media Player\wmplayer.exe" | |
FOR %%G IN (".ppt", ".pptx") DO ( | |
IF /I "%FILE_EXT%"==%%G ( | |
%POWERPNT_EXE_PATH% /S %FILE% | |
EXIT | |
) | |
) | |
IF /I "%FILE_EXT%"==".pdf" ( | |
%AcroRd32_EXE_PATH% /A "pagemode=FullScreen" %FILE% | |
EXIT | |
) | |
FOR %%G IN (".avi", ".mpeg", ".mpg", ".mp4", ".MTS") DO ( | |
IF /I "%FILE_EXT%"==%%G ( | |
%wmplayer_EXE_PATH% %FILE% /play /fullscreen | |
EXIT | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment