Advertisement
ILikeTurtles

Messenger Script - 07/08/15

Jul 8th, 2015
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.52 KB | None | 0 0
  1. @echo off
  2. cls
  3.  
  4. REM If exists, remove existing bat installation of LANMessenger
  5.  
  6.  
  7. Echo If exists, removing existing bat installation of LANMessenger.
  8. if exist "C:\LANMessenger" (
  9.     Echo Previous bat installation of LANMessenger found!
  10.     Echo Deleting installation...
  11.     RMDIR /S /Q "C:\LANMessenger\"
  12. )
  13.  
  14. Echo If exists, clean up existing config.
  15. if exist "%USERPROFILE%\AppData\Roaming\LAN Messenger\LAN Messenger.ini" (
  16.     Echo Previous bat installation of LANMessenger found!
  17.     Echo Deleting configuration...
  18.     DEL "%USERPROFILE%\AppData\Roaming\LAN Messenger\LAN Messenger.ini"
  19.     Echo Giving a slight delay to let system catch up with the script.
  20.     timeout /t 10
  21.     Echo Generating new configuration...
  22.     Echo.[General]>> "%USERPROFILE%\AppData\Roaming\LAN Messenger\LAN Messenger.ini"
  23.     Echo.AutoStart=false>> "%USERPROFILE%\AppData\Roaming\LAN Messenger\LAN Messenger.ini"
  24. )
  25.  
  26.  
  27. REM Sync LANMessenger from \\HC-DC01\Programs\LANMessenger to Local Machine
  28.  
  29. Echo Installing/Updating LANMessenger - %date%
  30. robocopy "\\HC-DC01\Programs\LANMessenger" "C:\CIS\LANMessenger" /S /XO /XJ
  31. Echo Sync Complete!
  32.  
  33.  
  34. REM Verify Shortcuts
  35.  
  36.  
  37.  
  38. Echo Verifying Desktop Shortcut
  39. if exist "%USERPROFILE%\Desktop\Messenger.lnk" (
  40.     REM No action necessary!
  41.     Echo Shortcut exists!
  42. ) else (
  43.    
  44.     cscript C:\CIS\LANMessenger\CreateShortcut.vbs
  45.  
  46. )
  47.  
  48. REM Give slight delay, then launch messenger.
  49.  
  50. Echo Giving slight delay to let the system catch up with the script.
  51. timeout /t 10
  52.  
  53. Echo Launching LANMessenger!
  54. start C:\CIS\LANMessenger\lmc.exe
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement