Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- :Start
- rem Push the current directory onto a temporary variable using the
- rem pseudo-variable CD (requires command extensions to be enabled)
- set _curr_dir=%CD%
- rem get_iplayer is a Win32 app, if running on 64-bit Windows it
- rem will have been installed in C:\Program Files (x86)\get_iplayer
- rem and if running on 32-bit Windows it will have been installed
- rem in C:\Program Files\get_iplayer
- if "%ProgramFiles(x86)%"=="" goto ProgFiles
- :x86pf
- rem We're running on 64-bit Windows
- rem Change drive and directories
- C:
- rem cd "\Program Files (x86)\get_iplayer"
- cd /d "%ProgramFiles(x86)%\get_iplayer"
- goto RunGetIPlayer
- :ProgFiles
- rem We're running on 32-bit Windows
- rem Change drive and directories
- C:
- cd /d "%ProgramFiles%\get_iplayer"
- goto RunGetIPlayer
- :RunGetIPlayer
- rem Run get_iplayer
- perl.exe get_iplayer.pl %*
- :Return
- rem Pop the current directory back from a temporary variable
- cd /d %_curr_dir%
- rem Clear the temporary variable
- set _curr_dir=
- :End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement