meph’s blog

2009/10/06

Some scripts

Filed under: Client Management, Scripting, Windows — Tags: , , — Michael @ 13:43

In case someone finds it interesting…

Run cctk and set BIOS options for Dell workstations

@echo off
REM Check if wmic is available on this system
WMIC.EXE /? >NUL 2>&1
IF %ERRORLEVEL% == 1 (
echo ERROR: WMIC.EXE not found.
echo.
GOTO EXIT
)
REM Check for Dell workstation
wmic bios get manufacturer /format:list | find /I "Dell" > NUL
if %ERRORLEVEL% == 1 (
echo ERROR: No Dell workstation!
echo.
GOTO EXIT
)
REM Check architecture
if /I "%PROCESSOR_ARCHITECTURE%" == "x86" GOTO X86
if /I "%PROCESSOR_ARCHITECTURE%" == "amd64" GOTO AMD64
:X86
cd %PROGRAMFILES%\Dell\CCTK\X86
REM Check if cctk for X86 is installed
IF %ERRORLEVEL% == 1 (
echo ERROR: CCTK not installed.
echo.
GOTO EXIT
)
REM Run cctk and set options
cctk.exe --wakeonlan=enable > NUL
cctk.exe --lowpowers5=disable > NUL
GOTO EXIT
:AMD64
cd %PROGRAMFILES%\Dell\CCTK\X86_64
REM Check if cctk for AMD64 is installed
IF %ERRORLEVEL% == 1 (
echo ERROR: CCTK not installed.
echo.
GOTO EXIT
)
REM Run cctk and set options
cctk.exe --wakeonlan=enable > NUL
cctk.exe --lowpowers5=disable > NUL
GOTO EXIT
:EXIT
REM Finished!
exit

Load predefined Outlook profile for any new user

@echo off
REM Check for Windows XP
ver | find "XP"
if %ERRORLEVEL% == 1 goto exit
reg load hklm\temp "%systemdrive%\documents and settings\default user\ntuser.dat"
reg add hklm\temp\Software\Microsoft\Office\10.0\Outlook\Setup /v ImportPRF /d \\server\share\Outlook.prf
reg unload hklm\temp

Advertisements

Blog at WordPress.com.