Advertisement
qiwichupa

File type association

Jul 27th, 2011
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.51 KB | None | 0 0
  1. @echo off
  2.  
  3. ::  goto:NOTIF
  4.  
  5.     assoc .tif|find /i "tif">nul
  6.     if errorlevel 1 goto:TIF
  7.     ftype tif|find /i "%ProgramFiles%\Imaging\Imaging.exe">nul
  8.     if errorlevel 1 goto:TIF
  9. ::  echo no needed!
  10.     exit
  11.  
  12.     :TIF
  13.     pushd \\server08\log$\TIF
  14.     echo *** %date:~-10% %time:~,8% Machine %username%@%computername% tif associating..>>%computername%.log
  15.     popd
  16.     ASSOC .tif=tif
  17.     FTYPE tif="%ProgramFiles%\Imaging\Imaging.exe" "%%1"
  18.     echo tif associated succesfully!
  19.     goto:EOF
  20.  
  21.     :NOTIF
  22.     assoc .tif=
  23.     ftype tif=
  24.     goto:EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement