Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: Released under the GNU General Public License version 3 by J2897.
- @echo OFF
- setlocal
- pushd "%~dp0"
- title Scheduled Task Importer
- REM Check for administrative privileges.
- ver | findstr "Version 6." >nul
- if %ERRORLEVEL% == 0 (
- openfiles >nul
- if errorlevel 1 (
- exit /b 1
- )
- )
- REM Credentials for remote machine.
- set "USER=J2897"
- set "PASS=password"
- REM Pass the password to schtasks.exe and tell it to import the XML file.
- echo %PASS%|schtasks /Create /TN "\Updates\Update Cygwin" /XML "SchedTask.xml" /RU %USER% /F
- popd
- endlocal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement