@echo off
REM-------------------------------------------------------------------------
rem Need admin Access first Admin group:global procurement-computer Services
REM-------------------------------------------------------------------------
If exist "C:\temp\SHClinetInstall\InstallApplication.vbs" (Goto here) Else (Goto Miss)
: here
Echo-------------------
Echo Start Script ...
Echo-------------------
echo Script Start at%date%%time% >> C:\temp\SHClinetInstall.log
REM-------------------------------------------------------------------------
REM Description
REM-------------------------------------------------------------------------
REM Script would finish computer installing automatically afterward
REM Script used for Walmart China SH Sourcing Office
REM-------------------------------------------------------------------------
REM Change Log
REM-------------------------------------------------------------------------
REM 2016-11-8 Eric Fu Initialize Script for Walmart SH computer clinets
REM 2016-11-14 Eric Fu Enable romte assistance for Walmart SH Computers
REM-------------------------------------------------------------------------
REM Variable Declaration
REM-------------------------------------------------------------------------
Set DC=S09060NTS011CN
Set tz= "China Standard Time"
REM-------------------------------------------------------------------------
REM Optimize clinet DC Location
REM-------------------------------------------------------------------------
for/f%%i in (' hostname ') do set hostname=%%i
Nltest/server:%hostname%/sc_reset:wmsc\%dc% >> C:\temp\SHClinetInstall.log
REM-------------------------------------------------------------------------
REM Change TimeZone to utc+08:00
REM-------------------------------------------------------------------------
TZUTIL/S%tz%
If%errorlevel% EQU 0 (Echo TimeZone is Changed successfully at%date%%time% >> C:\temp\SHClinetInstall.log) Else (Echo Set TimeZone Error at%date%%time% >> C:\temp\SHClinetInstall.log)
REM-------------------------------------------------------------------------
REM User Login Script
REM-------------------------------------------------------------------------
echo F | xcopy "C:\temp\SHClinetInstall\wmSheildVSTOedit.vbs" "C:\ProgramData\Microsoft\Windows\Start menu\programs\ Startup\wmsheildvstoedit.vbs "/y >> C:\temp\SHClinetInstall.log
REM-------------------------------------------------------------------------
REM Start Application installing
REM-------------------------------------------------------------------------
for/f "delims="%%a in (' Cscript-nologo C:\temp\SHClinetInstall\InstallApplication.vbs ') do set str=%%a
Echo Machine is%str% >> C:\temp\SHClinetInstall.log
Echo Machine is%str%
If%str% EQU laptop (goto laptopinstall) Else (if%str% EQU Desktop (goto desktopinstall) Else (goto end))
: Miss
Echo-------------------
Echo Copy Service failed
echo Pls Restart Script
Echo-------------------
echo Copying Failed at%date%%time% >> C:\temp\SHClinetInstall.log
Pause
Goto END
: Laptopinstall
echo Start laptop installing >> C:\temp\SHClinetInstall.log
echo Start Laptop Installing ...
xcopy "C:\temp\SHClinetInstall\Package\gpic.lnk" "C:\Users\Public\Desktop"/y/q
echo Copy File gpic.lnk at%date%%time% >> C:\temp\SHClinetInstall.log
xcopy "C:\temp\SHClinetInstall\Package\Retail link.url" "C:\Users\Public\Desktop"/y/q
echo Copy File Retail link.url at%date%%time% >> C:\temp\SHClinetInstall.log
xcopy "C:\temp\SHClinetInstall\Package\rlink.ico" "C:\windows"/y/q
echo Copy File Rlink.ico at%date%%time% >> C:\temp\SHClinetInstall.log
xcopy "C:\temp\SHClinetInstall\Package\GS ISD portal.url" "C:\Users\Public\Desktop"/y/q
echo Copy File GS ISD portal.url at%date%%time% >> C:\temp\SHClinetInstall.log
xcopy "C:\temp\SHClinetInstall\Package\One_Team.ico" "C:\windows"/y/q
echo Copy File One_team.ico at%date%%time% >> C:\temp\SHClinetInstall.log
xcopy "C:\temp\SHClinetInstall\Package\CUSTOM" "C:\Program Files (x86) \internet Explorer"/s/y/q
echo Copy File IE CUSTOM at%date%%time% >> C:\temp\SHClinetInstall.log
Start C:\temp\SHClinetInstall\Package\MPA_Install.EXE
if errorlevel 0 (echo MPA install successfully >> C:\temp\SHClinetInstall.log) Else (echo MPa install failed >> ; C:\temp\SHClinetInstall.log)
Start c:\temp\shclinetinstall\package\ciscoipcommunicatorsetup.msi/qb+! /norestart tftp1=161.163.60.11 tftp2=161.163.60.12
if errorlevel 0 (echo CIPC install successfully >> C:\temp\SHClinetInstall.log) Else (Echo CIPC install failed >& Gt C:\temp\SHClinetInstall.log)
choice/t 15/d y/n >nul
Reg Import C:\temp\SHClinetInstall\EnableRA.reg
Gpupdate/force
Echo-------------------
Echo **script complete**
Echo-------------------
Pause
Goto END
:d Esktopinstall
echo Start Desktop installing >> C:\temp\SHClinetInstall.log
echo Start Desktop Installing ...
xcopy "C:\temp\SHClinetInstall\Package\gpic.lnk" "C:\Users\Public\Desktop"/y/q
echo Copy File gpic.lnk at%date%%time% >> C:\temp\SHClinetInstall.log
xcopy "C:\temp\SHClinetInstall\Package\Retail link.url" "C:\Users\Public\Desktop"/y/q
echo Copy File Retail link.url at%date%%time% >> C:\temp\SHClinetInstall.log
xcopy "C:\temp\SHClinetInstall\Package\rlink.ico" "C:\windows"/y/q
echo Copy File Rlink.ico at%date%%time% >> C:\temp\SHClinetInstall.log
xcopy "C:\temp\SHClinetInstall\Package\GS ISD portal.url" "C:\Users\Public\Desktop"/y/q
echo Copy File GS ISD portal.url at%date%%time% >> C:\temp\SHClinetInstall.log
xcopy "C:\temp\SHClinetInstall\Package\One_Team.ico" "C:\windows"/y/q
echo Copy File One_team.ico at%date%%time% >> C:\temp\SHClinetInstall.log
xcopy "C:\temp\SHClinetInstall\Package\CUSTOM" "C:\Program Files (x86) \internet Explorer"/s/y/q
echo Copy File IE CUSTOM at%date%%time% >> C:\temp\SHClinetInstall.log
Start C:\temp\SHClinetInstall\Package\MPA_Install.EXE
if errorlevel 0 (echo MPA install successfully >> C:\temp\SHClinetInstall.log) Else (echo MPa install failed >> ; C:\temp\SHClinetInstall.log)
Start c:\temp\shclinetinstall\package\ciscoipcommunicatorsetup.msi/qb+! /norestart tftp1=161.163.60.11 tftp2=161.163.60.12
if errorlevel 0 (echo CIPC install successfully >> C:\temp\SHClinetInstall.log) Else (Echo CIPC install failed >& Gt C:\temp\SHClinetInstall.log)
choice/t 15/d y/n >nul
Reg Import C:\temp\SHClinetInstall\EnableRA.reg
Gpupdate/force
Echo-------------------
Echo **script complete**
Echo-------------------
Pause
Goto END
: End
This article from the "Erick" blog, declined to reprint!
Walmart New Computer setup