Search This Blog

Monday, April 28, 2008

Blackberry Contacts not syncing from Outlook contact subfolders

Just ran across an interesting issue with a client's blackberry. 
After his desktop was upgraded to Office 2007, the contact sub-folders stopped syncing randomly. 
Most folders still synced, some however did not. 
The user has all his contacts sorted by subfolders inside of the main Contacts folder in Outlook. 
Tried creating test contacts and folders, and could not find a relation between syncing and non syncing folders/contacts. 

Solution: Deleted the user from the Blackberry Enterprise Server, cleared all Blackberry related data (one of the prompts when deleting). 
Wiped the handheld. 
Created the account on the server not using the old stats (prompt). 
Reactivated and everything worked perfectly.

Monday, April 14, 2008

DST2008 script - could be used for other things

Basically i wrote this script to address an issue our parent company was having with incompletely patched machines. By opening the clock and unchecking and then checking back the Automatically adjust clock for daylight saving changes the issue is resolved as the time zone gets reapplied properly. The problem is that if a user has no admin rights, youre pretty much screwed. This script will also run the Outlook mailbox TZMove tool. Yes you could run it centrally. But how do you know which user's were patched before the existing appointments got created?

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
AutoItSetOption ("RunErrorsFatal", 0)
AutoItSetOption ("TrayIconHide",1)
call ("StartSequence")
Func StartSequence()
    if $CmdLine[$CmdLine[0]] = "" then 
            case $CmdLine [1] = "/uninstall"
                if not IsAdmin() then Exit
            case $CmdLine [1] = "/install" 
                $DS = RegRead ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation", "DaylightStart")
                if $DS = "00000300020002000000000000000000" then
                    $log = FileOpen("\\NYITSUPPORT\DST2008\LOGS\" & @ComputerName & ".log",9)
                    FileWriteLine($log, @CRLF & "DaylightStart is proper. Nothing done " & @MON & "/" & @MDAY & "/" & @YEAR & " - " & @HOUR & ":" & @MIN)
                    if not IsAdmin() then Exit
                    Call ("Install")
            case $CmdLine [1] = "/tzmove"
                call ("tzmove")
            case Else
func tzmove()
    RunWait('"C:\Program Files\Microsoft Office\Office12\Office Outlook Time Zone Data Update Tool\tzmove.exe" /quiet',"",@SW_HIDE)
    $log = FileOpen("\\NYITSUPPORT\DST2008\LOGS\" & @UserName & "\" & @ComputerName & ".log",9)
    FileWriteLine($log, @CRLF & "TZMove executed " & @MON & "/" & @MDAY & "/" & @YEAR & " - " & @HOUR & ":" & @MIN)
    FileCopy(@TempDir & "\Outlook Time Zone Update.log", "\\NYITSUPPORT\DST2008\LOGS\" & @UserName,9)
Func Install()
    $StandardName = RegRead("HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation", "StandardName")
    RunWait('"control.exe" timedate.cpl,,/Z ' & $StandardName)
    FileCopy(@ScriptDir & "\tzmove.exe", "C:\Program Files\NYITSUPPORT\DST2008\", 9)
    RunWait('"C:\Program Files\NYITSUPPORT\DST2008\tzmove.exe" /passive /quiet /extract:"c:\program files\NYITSUPPORT\dst2008"',"c:\program files\NYITSUPPORT\dst2008")
    RunWait('msiexec /i "C:\Program Files\NYITSUPPORT\DST2008\tzmove.msi" /q', "C:\Program Files\NYITSUPPORT\DST2008")
    FileCopy(@ScriptFullPath, "C:\program files\NYITSUPPORT\DST2008\",9)
    FileCreateShortcut("C:\Program Files\NYITSUPPORT\DST2008\DST2008.exe", "C:\Documents and settings\all users\start menu\programs\startup\DST2008.lnk", "", "/tzmove")
    $log = FileOpen("\\NYITSUPPORT\DST2008\LOGS\" & @ComputerName & ".log",9)
    FileWriteLine($log, @CRLF & "Installed " & @MON & "/" & @MDAY & "/" & @YEAR & " - " & @HOUR & ":" & @MIN)
Func Uninstall()
    FileDelete("c:\documents and settings\all users\start menu\programs\startup\dst2008.lnk")
    FileDelete("c:\documents and settings\all users\start menu\programs\startup\dst2008.exe.lnk")
    DirRemove("c:\program files\NYITSUPPORT\DST2008",1)
    $log = FileOpen("\\NYITSUPPORT\DST2008\LOGS\" & @ComputerName & ".log",9)
    FileWriteLine($log, @CRLF & "Uninstalled " & @MON & "/" & @MDAY & "/" & @YEAR & " - " & @HOUR & ":" & @MIN)

I believe you will find the switches useful. You can customize this for anything you want. I used AutoItScript as the development environment. 

Ever since i started using it for a DST rollout in 2007 where i wrote a much larger script, i have never looked back at vbscript ot writing batch files. The price is unbeatable at $0.00. It lets you compiles. 

TZMove.exe and DST2008.exe need to be in the same folder. 

/install This option will check if the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\DaylightStart value is correctly set as 00000300020002000000000000000000

If it is proper the application will exit. 

Else it will check for admin rights and run the check/uncheck of the “Automatically adjust clock for daylight saving changes” by toggling the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\DisableAutoDaylightTimeSet value. 

It will also manually enter the 00000300020002000000000000000000 value as a precaution. 

Run TZMove.exe /passive /quiet /extract:c:\program files\NYITSUPPORT\dst2008, which will extract the tzmove.msi and the catalog folder. 

Run tzmove.msi /q, which will install the application to the default C:\Program Files\Microsoft Office\Office12\Office Outlook Time Zone Data Update Tool folder. 

Create a shortcut to c:\Program Files\NYITSUPPORT\DST2008.exe /tzmove under c:\Documents and Settings\All Users\Start Menu\Programs\StartUp Create a ComputerName.log file under \\NYITSUPPORT\DST2008\LOGS and enter Installed MM/DD/YYYY – 00:00 into the file. 

/uninstall Delete c:\documents and settings\all users\start menu\programs\startup\dst2008.lnk and the c:\program files\NYITSUPPORT\DST2008 folder.

Enter a log in ComputerName.log file under \\NYITSUPPORT\DST2008\LOGS and append Uninstalled MM/DD/YYYY – 00:00 into the file. 

/tzmove This option is only initiated by the shortcut set using the /install switch at next logon of the user. 

Run C:\Program Files\Microsoft Office\Office12\Office Outlook Time Zone Data Update Tool\tzmove.exe /quiet Create a log under \\NYITSUPPORT\DST2008\LOGS\username\computername.log and enter TZMove executed MM/DD/YYYY – 00:00 into the file. 

Copy %temp%\Outlook Time Zone Update.log to the \\NYITSUPPORT\DST2008\LOGS\username folder.

Thursday, April 10, 2008

Vista SP1 missing right click context menu search

Here is how to get it back based on the link below.

Open regedit and navigate to HKEY_CLASSES_ROOT\Directory\shell\find

delete the LegacyDisable entry