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

2009/07/22

Automatic creation of a new profile on first Outlook start

Filed under: Exchange, Outlook — Tags: , , , — Michael @ 10:10

No post here for a while 😉

Today I searched for a simple solution for automatic profile creation on the first Outlook start (I wanted this for our new XenApp terminalserver). It took a while until I found some useful information about that, but I was too lazy for most solutions (netlogon scripts, WSH scripting etc.) – they were just not simple enough. Above from that, Office XP (and therefore Outlook) was installed already. To make a long story short, here is what I did:

The Office Resource Kit includes the Custom Installation Wizard (CIW), which can generate a .PRF (Outlook profile, including account information and stuff) file. In my case, I just needed to tell Outlook that it should use the user’s Windows logon name for authentication and the Exchange server hostname. Just skip the first steps in CIW until you get to the profile creation. Do the configuration and save the .prf file to a commonly available location, e.g. a networkshare (remember the UNC path). After that I followed these steps on the TS:

– Login as Administrator and run regedit
– Load C:\Documents and Settings\Default User\NTUSER.DAT
– In the loaded hive, browse to Software\Microsoft\Office\10.0\Outlook\Setup (create the missing keys!)
– Create a new String Value called ImportPRF and enter the path and filename of the .PRF as the value
– Unload the hive and close regedit
– Check if it works

That’s it!

2009/03/31

Deploy consistent mail signatures for Outlook

Filed under: Outlook — Tags: , , , — Michael @ 11:33

This is a cool solution. I tried it some days ago and it really makes things easier… All you have to do is:

1. Maintain all required employee information in the user object in Active Directory

2. Create a signature template (Text, RTF and/or HTML)

3. Edit the configuration file for OutlookSignature

4. Put it all together on a central share (e. g. your fileserver)

5. Add a line like “\\server\share\OutlookSignature\OutlookSignature.exe” to your user’s Netlogon-Scripts.

OutlookSignature will read all fields of the AD user object, fill the variables in your template and put the complete signature file in the profile folder of the user.

2009/03/30

Wastebasket and delegations in Outlook XP

Filed under: Outlook — Tags: , , — Michael @ 13:46

Per default, deleted items are always moved in the “Deleted Items”-folder of the user who deleted them. This is in fact not optimal when you have set up delegations.
This behavior can be changed by editing a key in the registry of the delegate:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\Options\General]
"DelegateWastebasketStyle"=dword:00000004"

Possible values for this DWORD are:

4 = Deleted items are moved to the wastebasket of the absent user
8 = Deleted items are moved to the wastebasket of the delegate

(this was found in the great MSXFAQ, more detailed information can be found here)

Blog at WordPress.com.