Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- cls
- REM If exists, remove existing bat installation of LANMessenger
- Echo If exists, removing existing bat installation of LANMessenger.
- if exist "C:\LANMessenger" (
- Echo Previous bat installation of LANMessenger found!
- Echo Deleting installation...
- RMDIR /S /Q "C:\LANMessenger\"
- )
- Echo If exists, clean up existing config.
- if exist "%USERPROFILE%\AppData\Roaming\LAN Messenger\LAN Messenger.ini" (
- Echo Previous bat installation of LANMessenger found!
- Echo Deleting configuration...
- DEL "%USERPROFILE%\AppData\Roaming\LAN Messenger\LAN Messenger.ini"
- Echo Giving a slight delay to let system catch up with the script.
- timeout /t 10
- Echo Generating new configuration...
- Echo.[General]>> "%USERPROFILE%\AppData\Roaming\LAN Messenger\LAN Messenger.ini"
- Echo.AutoStart=false>> "%USERPROFILE%\AppData\Roaming\LAN Messenger\LAN Messenger.ini"
- )
- REM Sync LANMessenger from \\HC-DC01\Programs\LANMessenger to Local Machine
- Echo Installing/Updating LANMessenger - %date%
- robocopy "\\HC-DC01\Programs\LANMessenger" "C:\CIS\LANMessenger" /S /XO /XJ
- Echo Sync Complete!
- REM Verify Shortcuts
- Echo Verifying Desktop Shortcut
- if exist "%USERPROFILE%\Desktop\Messenger.lnk" (
- REM No action necessary!
- Echo Shortcut exists!
- ) else (
- cscript C:\CIS\LANMessenger\CreateShortcut.vbs
- )
- REM Give slight delay, then launch messenger.
- Echo Giving slight delay to let the system catch up with the script.
- timeout /t 10
- Echo Launching LANMessenger!
- start C:\CIS\LANMessenger\lmc.exe
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement