@echo off
cls
ECHO Installing software, please wait

SET LogFolder=C:\Windows\INS\Logs
IF NOT EXIST %LogFolder% MKDIR %LogFolder%

ECHO Start %date% %time% >> %LogFolder%\InstallBat.log

IF NOT "%2."=="." GOTO invalidparameter
IF "%1."=="." GOTO Install
GOTO InstallReboot

:Install
ECHO Running Cscript.exe //B //nologo //Job:Install %0\..\..\package.wsf /Mode:Silent >> %LogFolder%\InstallBat.log
Cscript.exe //B //nologo //Job:Install %0\..\..\package.wsf /Mode:Silent
GOTO end

:InstallReboot
ECHO Running Cscript.exe //B //nologo //Job:Install %0\..\..\package.wsf /Mode:Silent >> %LogFolder%\InstallBat.log
Cscript.exe //B //nologo //Job:Install %0\..\..\package.wsf /Mode:Silent
GOTO end

:invalidparameter
ECHO invalidparameter >> %LogFolder%\InstallBat.log
ECHO Error: Invalid Parameter

:end
ECHO End %date% %time% >> %LogFolder%\InstallBat.log
