/build/static/layout/Breadcrumb_cap_w.png

DeLorme Publishing DeLorme Street Atlas USA 2010 Network

Version: 10

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login
Views: 2.1k  |  Created: 10/12/2009

Average Rating: 0
DeLorme Street Atlas USA 2010 Network has 1 inventory records, 0 Questions, 0 Blogs and 0 links. Please help add to this by sharing more!

Deployment Tips (2)

Most Common Setup Type
Not Determined
Average Package Difficulty Rating
Rated 0 / 5 (Not Rated) based on 0 ratings
Most Commonly Reported Deployment Method
Not Determined
0
Note
Some prerequisites are required. If you are a network customer Delorme will provide a script that installs them from the CD.


' VBScript source code

Option Explicit

'*********************************
'* CONSTANTS
'*********************************
Const HKEY_LOCAL_MACHINE = &H80000002
Const REG_SZ = 1
Const REG_EXPAND_SZ = 2
Const REG_BINARY = 3
Const REG_DWORD = 4
Const REG_MULTI_SZ = 7
Const XP_MAJOR_VERSION = 5



'
' @return The operating system major version number.
'
' @param strComputer if provided, then get the version of the remote
' computer, if not provided then get the OS version of this computer.
'
' @version 1.0
' @author Alan Hoyt
' @bug XMAP-4180
'
function GetOSversion(strComputer)


Dim objWMI, objItem, colItems
Dim version
' Here is where we interrogate the Operating System'
On Error Resume Next

version = "0"

' I took this code from http://www.computerperformance.co.uk/ezine/ezine52.htm and modified
' it for our purposes.



if( strComputer = "" ) then
' Get the OS Version from this computer.
strComputer = "."
end if

' This is where WMI interrogates the operating system
Set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMI.ExecQuery("Select * From win32_operatingsystem")

' Here we filter Version from the dozens of properties
For Each objItem in colItems
version = Left(objItem.Version,1)
Next

GetOSversion = CInt(version)


end function




'
' @return True if the given registry value contain information or False otherwise.
'
' @param strKey Is the path to the registry key that may or may not contain data, or may or may not
' exist.
'
' @param strValueName The name of the registry value to check.
'
' @param strComputer The name of the computer to check for the value on. WMI
' has to be working and available for this to work. This can be an empty string
' or nothing. If empty then we just check the local registry for the value.
'
' @version 1.0
' @author Alan Hoyt
' @bug XMAP-4180
'
function HasValue(nRoot, strKey, strValueName, strComputer)

On Error Resume Next

if( strComputer = "" ) then
strComputer = "."
end if

Dim strValue
Dim strMsg
Dim objReg




Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
If Err.Number <> 0 Then
strMsg = "There was a problem connecting to " _
& strComputer & "\root\default:StdRegProv" & VbCrLf _
& "Error " & Err.Number & " " & Err.description
WScript.StdOut.Write strMsg
WScript.Quit(1)
End If

objReg.GetStringValue nRoot, strKey, strValueName, strValue

if( IsNull(strValue) ) then
HasValue = False
else
HasValue = True
end if

Err.Clear

end function

'
' @return True if .NET 2.0 is installed or False otherwise.
'
'
' @version 1.0
' @author Alan Hoyt
' @bug XMAP-4180
'
function DotNetIsInstalled(strComputer)


DotNetIsInstalled = HasValue(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727", "Increment", strComputer)

if( GetOSversion(strComputer) > XP_MAJOR_VERSION ) then
' .NET is installed by default on Vista and newer operating systems.
DotNetIsInstalled = True
end if

end function

'
' @return True if the Visual C++ Redistributable is installed or False otherwise.
'
'
' @version 1.0
' @author Alan Hoyt
' @bug XMAP-4180
'
function VisualStudioRedistIsInstalled(strComputer)

VisualStudioRedistIsInstalled = HasValue(HKEY_LOCAL_MACHINE, "SOFTWARE\Classes\Installer\Products\b25099274a207264182f8181add555d0", "ProductName", strComputer)

end function

'
' @return True if the SQL Server Express 2005 SP2 is installed, or False otherwise.
'
'
' @version 1.0
' @author Alan Hoyt
' @bug XMAP-4180
'
function SQLserverIsInstalled(strComputer)

if( HasValue(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Microsoft SQL Server\XMAP5\MSSQLServer\CurrentVersion", "CurrentVersion", strComputer) ) then
SQLserverIsInstalled = True
Exit Function
end if

if( HasValue(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Microsoft SQL Server\XMAP6\MSSQLServer\CurrentVersion", "CurrentVersion", strComputer) ) then
SQLserverIsInstalled = True
Exit Function
end if

SQLserverIsInstalled = False

end function

'
' @return True if the customer has chosen to install SQL Server, or False otherwise.
'
'
' @version 1.0
' @author Alan Hoyt
' @bug XMAP-4180
'
function InstallingSQLserver(strPrerequisitePath)

Dim fileSystem
Dim strPath
Dim iniStream
Dim strLine
Dim installingSQLpattern

set fileSystem = wscript.CreateObject("Scripting.FileSystemObject")

strPath = fileSystem.GetParentFolderName(strPrerequisitePath)

strPath = fileSystem.BuildPath(strPath, "Setup.ini")
On Error Resume Next
set iniStream = fileSystem.OpenTextFile(strPath, 1, False)

if iniStream Is Nothing then
wscript.StdOut.WriteLine("Failed to open " & strPath & " for reading.")
wscript.Quit(1)
end if

set installingSQLpattern = new RegExp

' The customer chooses to install SQL server by having the PreReq<N>=Microsoft SQL Server... line
' in the prerequisiste installer as not commented out. If the customer does not want SQL server
' installed then they simply add a ';' to the start of the Microsoft SQL server line in the Setup.ini
' file in the Prerequisite installer media folder.
installingSQLpattern.Pattern = "^PreReq\d*=Microsoft SQL Server"
installingSQLpattern.IgnoreCase = True

Do While iniStream.AtEndOfStream <> True

strLine = iniStream.ReadLine()

if( installIngSqlpattern.Test(strLine) = True ) then
iniStream.Close
InstallingSQLserver = True
Exit Function
end if
Loop


iniStream.Close
InstallingSQLserver = False

end function

'
' @return True if all the prerequisites are installed, or False otherwise.
'
' Combines all the functions for checking each prerequisiste into one function to make it
' easy to deal with.
'
' @version 1.0
' @author Alan Hoyt
' @bug XMAP-4180
'
function ArePrerequisitesInstalled(strPrerequisitePath, strComputer)

if( DotNetIsInstalled(strComputer) = False ) then
ArePrerequisitesInstalled = False
Exit Function
elseif (VisualStudioRedistIsInstalled(strComputer) = False ) then
ArePrerequisitesInstalled = False
Exit Function
elseif(InstallingSQLserver(strPrerequisitePath) = True And SQLserverIsInstalled(strComputer) = False) then
ArePrerequisitesInstalled = False
Exit Function
end if

ArePrerequisitesInstalled = True

end function

' ******************************************************************************************
' * MAIN
' ******************************************************************************************

DIM USAGE

DIM nArgumentCount
DIM strPrerequisitePath
DIM shell

On Error Resume Next

USAGE = _
"Usage: RunPrerequisites <path to setup.exe> [computer]" & vbCrLf _
& " <path to setup.exe> := This should be a fully qualified path " & vbCrLf _
& " to the prerequisites.exe on a network share that has read " & vbCrLf _
& " and execute permissions for Everyone." & vbCrLf _
& " [computer] := This is an optional parameter that specifies the remote computer "& vbCrLf _
& " to check to see if the prerequisites are isntalled. This performs a check only, " & vbCrLf _
& " no action is taken when the parameter is provided." & vbCrLf & vbCrLf

nArgumentCount = wscript.Arguments.Count()

if( nArgumentCount < 1 ) then
wscript.StdOut.WriteLine(USAGE)
wscript.Quit(1)
end if


strPrerequisitePath = wscript.Arguments(0)

set shell = wscript.CreateObject("wscript.shell")


DIM fileSystem
Dim strComputer

strComputer = ""

if( nArgumentCount > 1 ) then
strComputer = wscript.Arguments(1)
else
strComputer = "."
end if


set fileSystem = wscript.CreateObject("Scripting.FileSystemObject")

if fileSystem.FileExists(strPrerequisitePath) = False Then
wscript.StdOut.WriteLine( strPrerequisitePath & "Does not exist." & vbCrLf _
& USAGE)

wscript.Quit(1)
end if

DIM bInstalled



bInstalled = ArePrerequisitesInstalled(strPrerequisitePath, strComputer)

if bInstalled = True then
wscript.StdOut.WriteLine "The prerequisites are installed."
wscript.Quit(0)
else
wscript.StdOut.WriteLine "The prerequisites are not installed."
end if

if( nArgumentCount > 1 ) then
' We are just testing to see if prerequisites are installed or not, so do not continue
' any further in the script.
wscript.Quit(1)
end if


err.Clear

' Run the prerequisite here Remember to test a failure and success
' scenario.

DIM nExitValue

nExitValue = shell.Run("""" & strPrerequisitePath & """ /s /v""/qn""", _
0, True)

if nExitValue <> 0 then
wscript.StdOut.WriteLine "The prerequisite installer returned an error."
wscript.Quit(1)
end if

wscript.Quit(0)
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
0
Command Line
Install the Prerequisites using the script:
CSCRIPT "\\Server\Share\DeLorme\2010\Admin Prerequisites Installer\RunPrerequisites.vbs" "\\Server\Share\DeLorme\2010\Admin Prerequisites Installer\prerequisites.exe"

Then install the Program using standard MSI switches:
"\\Server\Share\DeLorme\2010\DeLorme Street Atlas USA 2010.msi" /l*v "C:\temp\bgsetupDELORME2010.txt" /qn TRANSFORMS="\\Server\Share\DeLorme\2010\Transforms.mst"
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows

Inventory Records (1)

View inventory records anonymously contributed by opt-in users of the K1000 Systems Management Appliance.

Versions

DeLorme Street Atlas USA 2010 Network

Version

10

Questions & Answers (0)

Questions & Answers related to DeLorme Publishing DeLorme Street Atlas USA 2010 Network

Blogs (0)

Blog posts related to DeLorme Publishing DeLorme Street Atlas USA 2010 Network

Reviews (0)

Reviews related to DeLorme Publishing DeLorme Street Atlas USA 2010 Network

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ