Need Macro to Detect Project Pro Version

C

Carl Paul

I am the tech lead in an organization using project server 2003 and several
hundred client-desktop Project Pro copies. We went through a conversion this
spring to SP2A on the server and SP2 on the client. However, recently, I have
discovered 2 instances where Project Pro SP1 "leaked" back into use.

I need a macro that will block Project Pro SP1 use and put up a message box
telling the user about the problem...

Anybody have anything like that???


Carl
 
M

MikeN

Our group had a similar issue, but the bottom line was communication. We
elevated the awareness of the desktop support Managers and Techs, so they all
new what version should be installed on the end users desktops, and we
created a SharePoint Application Support site to communicate with the user
base and provide links to the appropriate service packs.
 
C

Carl Paul

'Here is the Macro!

Private Sub CheckProjectProVersion()

Dim fso As New FileSystemObject
Dim myVersion As String
Dim FileFoundFlag As Boolean
Const ErrMsgSuffix As String = vbCrLf & vbCrLf & "Please resolve this
problem as follows:" & vbCrLf & _
"1. Send an email message to the PMO at (e-mail address removed) with
a screen shot of this error message: " & vbCrLf & _
"2. Open a Support Desk ticket for this error"

On Error Resume Next
Err.Clear
FileFoundFlag = (fso.FileExists(Application.Path + "\WinProj.exe"))
If Err.Number <> 0 Then
MsgBox "Error #FE0N:" & vbCrLf & "Project Version Cannot be Determined:
Missing FSO: " & Err.Description & ErrMsgSuffix, vbCritical +
vbApplicationModal, "System Error"
Err.Clear
Else
If FileFoundFlag = False Then
MsgBox "Error #FFFF:" & vbCrLf & "Project Version Cannot be
Determined: Missing Executable: " + Application.Path + "\WinProj.exe" &
ErrMsgSuffix, vbCritical + vbApplicationModal, "System Error"
Else
myVersion = CStr(fso.GetFileVersion(Application.Path +
"\WinProj.exe"))
If Err.Number <> 0 Then
MsgBox "Error #FSOV:" & vbCrLf & " Project Version Cannot be
Determined: Missing FSO: " & Err.Description & ErrMsgSuffix, vbCritical +
vbApplicationModal, "System Error"

Err.Clear
Else
If myVersion = "" Then
MsgBox "Error #FVMN:" & vbCrLf & "Project Version
Missing" & ErrMsgSuffix, vbCritical + vbApplicationModal, "System Error"
Else
If (myVersion = "11.0.2003.816") Or (myVersion =
"11.1.2004.1707") Then
'If myVersion <> "11.2.2005.1801" Then
MsgBox "SYSTEM ERROR:" & vbCrLf & vbCrLf & "Your copy of
MS Project Pro does not have Service Pack 2. You must close the program
immediately without saving or you may damage your project data." & vbCrLf &
vbCrLf & _
"Please resolve this problem as follows:" & vbCrLf & _
"1. Send an email message to the PMO at (e-mail address removed) with
a screen shot of this error message: " + myVersion & vbCrLf & _
"2. Open a Support Desk ticket for the installation of
Project Pro Service Pack." & vbCrLf & vbCrLf & "Error: VNNV", vbCritical +
vbApplicationModal, "System Error"
'pj.ReadOnly = True
'Application.DocClose
'Application.FileCloseAll
'Application.Quit
Else
End If
End If
End If

End If

End If

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top