Jul 6 2009

3 Core Business Reasons for Windows 7 Upgrade

  1. Compatibility

The slow uptake or even non existent uptake of the VISTA operating system was due to incompatibility of drivers and applications, now that VISTA has been around for a while, and all major vendors now fully support Vista / 2008 server, being that windows 7 shares quite a bit of VISTA codebase in terms of drivers support. windows-7-logo-new[1]

Windows 7 also seems to have a very prominent place in the WWW, with major vendors jumping on board the beta band wagon, releasing pre driver support, Microsoft also already  offering upgrade paths, in association with all major PC vendors, such as Dell, HP, Asus the list goes on.

With that said its seems with the release of VISTA and the long public beta releases of windows 7, may of payed off with, thus compatibility between devices is a thing of the past.

 

2.  Legacy support

While this comes under compatibility I think this needs a specific mention, as I think this is one of the most compelling selling points from a SMB perspective. Its the ‘windows 7 XP mode’

what this is, is essentially a Virtual PC (VPC), but wait before you stop reading its a whole lot more than just a VPC… While they now support USB within the VPC, which is a vey nice addition. The VPC fully integrates with the guest OS, what this means is if you install an application within XP VPC,  it will appear within the windows 7 start menu, meaning you can launch the application from your primary machine without having to interact with the VPC at all.

Why is this such a big deal, and why should this help the SMB market take to windows 7 as there next OS?

Simple windows Vista no longer supports 16 bit applications, as it does not have a 16bit sub system like XP does. With the XP mode 16 bit is supported, therefore for all those SMB’s that have so many of those legacy systems that are 16bit based that couldn’t go to VISTA because of this reason, but yet IT managers, CTO’s and CEO’s  didn’t want to spend the money to re-develop a 32bit version, when they have a perfectly good working application.

With XP mode 16 bit is very plausible that you can run your 16bit apps directly from windows 7!

        3.  Efficiency

With the overhaul of the task bar (referred to as the superbar), jump lists, ‘Aero shake’ to quickly minimize all apps apart from the shaken app, and the massive additions of shortcut keys that interact with windows 7  (many can be found in my previous blog post) All of these significantly increase the speed of which a user can work, while some seem very gimmicky like the Aero shake, it actually serves a  unique and quick outcome.

The other side to efficiency of windows 7 is not just in the shortcuts and the new features but yet the OS it self has significantly improved on boot and shutdown times, It’s processing of newer applications on modern hardware is superior over XP, where windows 7 uses the processor and memory more efficiently.  Also for mobile users battery life is increased, it is said they they have reduced the power draw by up to 15%, and other tweaks for notebook users.

Last one is not for everyone but the fact that windows 7 allows Muti-touch, this can significantly speed up the processes of how quickly you can access your apps and files.


Jan 8 2009

AD Based Outlook Email Signature for 2003 and 2007 Part 4 – Now writes TXT and RTF as well as HTML – Revised.

(This is a continuation of http://bradmarsh.net/index.php/2008/11/20/ad-based-outlook-email-signature-for-2003-and-2007-part-4-now-writes-txt-and-rtf-as-well-as-html/)

Ok due to various people having problems with the RTF, where it might show the HTML rather then display correctly, Also it has come to my Attention RTF (not always) will not show images or wont handle them to well.  Other problems where it might not show in outlook also.

anyway’s this has been tested and all above issues seem to be resolved at least for me :)

The below is the new section:

What we are doing here in short is copying the .txt file we have created and then taking the text file and formatting this into something a little more presentable.

'===========================================================================
' Formats the RTF
'===========================================================================
Const wdExtend = 1 
'const wdStory = 6
'const wdMove = 1
 
 
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
'Be sure to change the file name to your desired name
Set objDoc = objWord.Documents.Open(Folderlocation & "Elcom.rtf")
Set objSelection = objWord.Selection
 
set objSelection = objDoc.Range()
'objDoc.Range()
'objSelection.HomeKey wdExtend
 
'you can add more functions IE Bold, underline, different font etc
objSelection.Font.Size = "10"
objSelection.Font.Name = "Arial"
 
'Save the file
'Be sure to change the file name to your desired name
objDoc.SaveAs Folderlocation & "Elcom.rtf", RTF
 
 
' Close the active document
objDoc.Close
 
'Close Word
objWord.Quit

I have used the TXT file, as this removes any images that might become broken. As I originally tried copying the HTML to get the colours and other items. However to do this I would have to call a .exe file that would convert HTML to RTF. This is all fine, but it creates a more complex script, which is something I really wanted to avoid.

However it would be obviously the optimal way of doing it, this way we get a nice looking RTF with colour.

I might still do this, but I with the HTML to RTF converter I do have it will not do images.

If you know of a good HTML to RTF converter that can be called as a .exe then let me know and I might just do the script, otherwise this is the best that I can do for the time being.

Here is the complete new code:

'====================
'
' VBScript: <Signatures.vbs>
' AUTHOR: Peter Aarts
' Contact Info: peter.aarts@l1.nl
' Version 2.04
' Date: January 20, 2006
' Moddified By Brad Marsh Now works with both 2003 and 2007 outlook 
' Contact: gentex@tpg.com.au
' Date 19 feb 08
' Tested on Vista, XP, XP64 and office 2003 and 2007. 
' NOTE will not work that well with various email accounts\
' modified: 8 Jan 09 - Brad Marsh
' added more support for RTF, copies TXT pulling out images and allows for formatting
'====================  
 
'Option Explicit
On Error Resume Next  
 
Dim qQuery, objSysInfo, objuser
Dim FullName, EMail, Title, PhoneNumber, MobileNumber, FaxNumber, OfficeLocation, Department
Dim web_address, FolderLocation, HTMFileString, StreetAddress, Town, State, Company
Dim ZipCode, PostOfficeBox, UserDataPath  
 
' Read LDAP(Active Directory) information to asigns the user's info to variables.
'====================
Set objSysInfo = CreateObject("ADSystemInfo")
objSysInfo.RefreshSchemaCache
qQuery = "LDAP://" & objSysInfo.Username
Set objuser = GetObject(qQuery)  
 
FullName = objuser.displayname
EMail = objuser.mail
Company = objuser.Company
Title = objuser.title
PhoneNumber = objuser.TelephoneNumber
FaxNumber = objuser.FaxNumber
OfficeLocation = objuser.physicalDeliveryOfficeName
StreetAddress = objuser.streetaddress
PostofficeBox = objuser.postofficebox
Department = objUser.Department
ZipCode = objuser.postalcode
Town = objuser.l
MobileNumber = objuser.TelephoneMobile
web_address = "http://www.elcom.com.au" 
 
' This section creates the signature files names and locations.
'====================
' Corrects Outlook signature folder location. Just to make sure that
' Outlook is using the purposed folder defined with variable : FolderLocation
' Example is based on Dutch version.
' Changing this in a production enviremont might create extra work
' all employees are missing their old signatures
'====================
Dim objShell, RegKey, RegKey07, RegKeyParm
Set objShell = CreateObject("WScript.Shell")
RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common\General"
RegKey07 = "HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\General"
RegKey07 = RegKey07 & "\Signatures"
RegKey = RegKey & "\Signatures"
objShell.RegWrite RegKey , "AD_elcom"
objShell.RegWrite RegKey07 , "AD_elcom"
UserDataPath = ObjShell.ExpandEnvironmentStrings("%appdata%")
FolderLocation = UserDataPath &"\Microsoft\AD_elcom\"
HTMFileString = FolderLocation & "Elcom.htm"  
 
' This section disables the change of the signature by the user.
'====================
'objShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common\MailSettings\NewSignature" , "L1-Handtekening"
'objShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common\MailSettings\ReplySignature" , "L1-Handtekening"
'objShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Options\Mail\EnableLogging" , "0", "REG_DWORD"  
 
' This section checks if the signature directory exits and if not creates one.
'====================
Dim objFS1
Set objFS1 = CreateObject("Scripting.FileSystemObject")
If (objFS1.FolderExists(FolderLocation)) Then
Else
Call objFS1.CreateFolder(FolderLocation)
End if  
 
' The next section builds the signature file
'====================
Dim objFSO
Dim objFile,afile
Dim aQuote
aQuote = chr(34)  
 
' This section builds the HTML file version
'====================
Set objFSO = CreateObject("Scripting.FileSystemObject")  
 
' This section deletes to other signatures.
' These signatures are automaticly created by Outlook 2003.
'====================
Set AFile = objFSO.GetFile(Folderlocation&"Elcom.rtf")
aFile.Delete
Set AFile = objFSO.GetFile(Folderlocation&"Elcom.txt")
aFile.Delete  
 
 
'=========================================================
' This adds the Text file, will need to be changed accordingly
'==========================================================
 
Set objFile = objFSO.CreateTextFile(Folderlocation&"Elcom.txt",True)
objfile.writeLine ""& FullName & " | " & title & " |  " & title & " | "& Company & " | Australian Technology Park" 
objfile.writeLine "T +612 " & PhoneNumber & " | F +612 9209 4423 | www.elcom.com.au | " & Email &" "
objfile.writeLine " "
objfile.writeLine " "
objfile.writeLine "--------------------------------------------------------------------------------"
objfile.writeLine "This email is intended for the intended recipients(s) and may contain confidential information. "
objfile.writeLine "Reproduction, dissemination or distribution of this message is prohibited unless authorised by the sender."
objfile.writeLine "If you are not the intended recipient, please notify the sender immediately and you must not read,"
objfile.writeLine "keep, use, disclose, copy or distribute this email without the sender's prior permission."
objfile.writeLine "The views expressed by the sender are not necessarily those of Elcom Technology Pty Ltd "
objFile.Close
 
 
Set objFile = objFSO.CreateTextFile(HTMFileString,True)
objFile.Close
Set objFile = objFSO.OpenTextFile(HTMFileString, 2)  
 
objfile.write "<!DOCTYPE HTML PUBLIC " & aQuote & "-//W3C//DTD HTML 4.0 Transitional//EN" & aQuote & ">" & vbCrLf
objfile.write "<HTML><HEAD><TITLE>Microsoft Office Outlook Signature</TITLE>" & vbCrLf
objfile.write "<META http-equiv=Content-Type content=" & aQuote & "text/html; charset=windows-1252" & aQuote & ">" & vbCrLf
objfile.write "<META content=" & aQuote & "MSHTML 6.00.3790.186" & aQuote & " name=GENERATOR></HEAD>" & vbCrLf
objfile.write "<body>" & vbCrLf
objfile.write "<font color=696969 face=" & aQuote & "Arial" & aQuote & "><h6> "& FullName & " | " & title & " | "& Company & " | Australian Technology Park <br>"& vbCrLf
objfile.write "T +612 " & PhoneNumber & " | F +612 9209 4423 | <a href=http://www.elcom.com.au><font color=#696969>www.elcom.com.au</font></a> |<a href=mailto:" & Email &" > <font color=#696969>" & Email &" " & vbCrLf
objfile.write "</h6></font></a></B>" & vbCrLf
objfile.write "</font>" & vbCrLf
objfile.write "<font color=696969 face=arial><A href=http://www.elcom.com.au/> <img src=http://www.elcom.com.au/images/elcom-logo-web-175x70.gif border=0></a>" & vbCrLf
objfile.write "<br>" & vbCrLf
objfile.write "<img src=http://www.elcom.com.au/images/mspartner.jpg>" & vbCrLf
objfile.write "<br>" & vbCrLf
objfile.write "</font><font color=696969 size=1 face=arial><br>" & vbCrLf
objfile.write "<hr size=1 align=left width=465 color=696969>" & vbCrLf
objfile.write " This email is intended for the intended recipients(s) and may contain confidential information. <br> Reproduction, dissemination or distribution of this message is prohibited unless authorised by the sender.<br> If you are not the intended recipient, please notify the sender immediately and you must not read,<br> keep, use, disclose, copy or distribute this email without the sender's prior permission.<br> The views expressed by the sender are not necessarily those of Elcom Technology Pty Ltd</font>"  & vbCrLf
objfile.write "</FONT></BODY></HTML>" & vbCrLf
objFile.Close
 
 
'==========================================================================
' This copies the .htm file and changes it to a RTF format
'==========================================================================
'Set the Source and Destination paths below - CHANGE your file name
'----------------------------------------------------
 
Const OverwriteExisting = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile Folderlocation & "Elcom.txt" , Folderlocation & "Elcom.rtf", OverwriteExisting
 
 
 
'===========================================================================
' Formats the RTF
'===========================================================================
Const wdExtend = 1 
'const wdStory = 6
'const wdMove = 1
 
 
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
'Be sure to change the file name to your desired name
Set objDoc = objWord.Documents.Open(Folderlocation & "Elcom.rtf")
Set objSelection = objWord.Selection
 
set objSelection = objDoc.Range()
'objDoc.Range()
'objSelection.HomeKey wdExtend
 
'you can add more functions IE Bold, underline, different font etc
objSelection.Font.Size = "10"
objSelection.Font.Name = "Arial"
 
'Save the file
'Be sure to change the file name to your desired name
objDoc.SaveAs Folderlocation & "Elcom.rtf", RTF
 
 
' Close the active document
objDoc.Close
 
'Close Word
objWord.Quit
 
 
 
' ===========================
' This section readsout the current Outlook profile and then sets the name of the default Signature
' ===========================
' Use this version to set all accounts
' in the default mail profile
' to use a previously created signature  
 
Call SetDefaultSignature("Elcom","")  
 
' Use this version (and comment the other) to
' modify a named profile.
'Call SetDefaultSignature _
' ("Signature Name", "Profile Name")  
 
Sub SetDefaultSignature(strSigName, strProfile)
Const HKEY_CURRENT_USER = &H80000001
strComputer = "."  
 
If Not IsOutlookRunning Then
Set objreg = GetObject("winmgmts:" & _
"{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows NT\" & _
"CurrentVersion\Windows " & _
"Messaging Subsystem\Profiles\"
' get default profile name if none specified
If strProfile = "" Then
objreg.GetStringValue HKEY_CURRENT_USER, _
strKeyPath, "DefaultProfile", strProfile
End If
' build array from signature name
myArray = StringToByteArray(strSigName, True)
strKeyPath = strKeyPath & strProfile & _
"\9375CFF0413111d3B88A00104B2A6676"
objreg.EnumKey HKEY_CURRENT_USER, strKeyPath, _
arrProfileKeys
For Each subkey In arrProfileKeys
strsubkeypath = strKeyPath & "\" & subkey
objreg.SetBinaryValue HKEY_CURRENT_USER, _
strsubkeypath, "New Signature", myArray
objreg.SetBinaryValue HKEY_CURRENT_USER, _
strsubkeypath, "Reply-Forward Signature", myArray
Next
Else
strMsg = "Please shut down Outlook before " & _
"running this script."
MsgBox strMsg, vbExclamation, "SetDefaultSignature"
End If
End Sub  
 
Function IsOutlookRunning()
strComputer = "."
strQuery = "Select * from Win32_Process " & _
"Where Name = 'Outlook.exe'"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colProcesses = objWMIService.ExecQuery(strQuery)
For Each objProcess In colProcesses
If UCase(objProcess.Name) = "OUTLOOK.EXE" Then
IsOutlookRunning = True
Else
IsOutlookRunning = False
End If
Next
End Function  
 
Public Function StringToByteArray _
(Data, NeedNullTerminator)
Dim strAll
strAll = StringToHex4(Data)
If NeedNullTerminator Then
strAll = strAll & "0000"
End If
intLen = Len(strAll) \ 2
ReDim arr(intLen - 1)
For i = 1 To Len(strAll) \ 2
arr(i - 1) = CByte _
("&H" & Mid(strAll, (2 * i) - 1, 2))
Next
StringToByteArray = arr
End Function  
 
Public Function StringToHex4(Data)
' Input: normal text
' Output: four-character string for each character,
' e.g. "3204" for lower-case Russian B,
' "6500" for ASCII e
' Output: correct characters
' needs to reverse order of bytes from 0432
Dim strAll
For i = 1 To Len(Data)
' get the four-character hex for each character
strChar = Mid(Data, i, 1)
strTemp = Right("00" & Hex(AscW(strChar)), 4)
strAll = strAll & Right(strTemp, 2) & Left(strTemp, 2)
Next
StringToHex4 = strAll  
 
 
End Function

Enjoy