/build/static/layout/Breadcrumb_cap_w.png

Bentley Systems, Inc. Bentley Prerequisites

Version: 0

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: 4.2k  |  Created: 02/28/2011

Average Rating: 0
Bentley Prerequisites 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
4
Note
The first thing to do is to extract the contents out of the setup.exe file (setup.exe /c /t:[extraction location]. To automate the task for a deployment, there are two parts:

1) once extracted, edit the file "PrerequisitesGUI.hta" and search for the section:

----------
Sub Window_OnLoad
' ***************************************************
' * The code starts here when the window is shown *
' ***************************************************
InstallerGUI_initializeDialog
call showDocumentTree ("After OnLoad")
End sub
----------

Modify it to:

----------
Sub Window_OnLoad
' ***************************************************
' * The code starts here when the window is shown *
' ***************************************************
'InstallerGUI_initializeDialog ' <--- comment this line
call InstallerGUI_startInstallation() ' <--- add this line
call showDocumentTree ("After OnLoad")
End sub

2) ' MsgBox strInstallComplete, vbOKOnly, document.title <--- comment this line

3) I created this VBScript to deploy Bentley Prereqs through MDT 2010. The script will close one the wscript.exe once the hta file is kicked off, so to get around that, I have it wait until the mshta.exe file closes, which is what is executed from an hta file. Here is the code to the VB Script:

'*******************************************************************************
' Program: Install.vbs
' Author: Mick Pletcher
' Date: 24 February 2011
' Modified:
'
' Program: Bentley Prerequisite
' Version: 08.11.07.06
' Description: This will install Bentley Prerequisites
' 1) Define Relative Installation Path
' 2) Create Log Folder
' 3) Install Bentley Prerequisites
' 4) Cleanup Global Variables
'*******************************************************************************
Option Explicit

REM Define Global Constants
CONST TempFolder = "c:\temp\"
CONST LogFolderName = "MicrostationV8i443"

REM Define Global Variables
DIM LogFolder : LogFolder = TempFolder & LogFolderName & "\"
DIM OS : Set OS = Nothing
DIM RelativePath : Set RelativePath = Nothing

REM Define Relative Installation Path
DefineRelativePath()
REM Create Log Folder
CreateLogFolder()
REM Install Bentley Prerequisites
InstallBentleyPrerequisites()
REM Cleanup Global Variables
GlobalVariableCleanup()

'*******************************************************************************
'*******************************************************************************

Sub DefineRelativePath()

REM Get File Name with full relative path
RelativePath = WScript.ScriptFullName
REM Remove file name, leaving relative path only
RelativePath = Left(RelativePath, InStrRev(RelativePath, "\"))

End Sub

'*******************************************************************************

Sub CreateLogFolder()

REM Define Local Objects
DIM FSO : Set FSO = CreateObject("Scripting.FileSystemObject")

If NOT FSO.FolderExists(TempFolder) then
FSO.CreateFolder(TempFolder)
End If
If NOT FSO.FolderExists(LogFolder) then
FSO.CreateFolder(LogFolder)
End If

REM Cleanup Local Variables
Set FSO = Nothing

End Sub

'*******************************************************************************

Sub DetermineOperatingSystem()

REM Define Local Objects
DIM FSO : SET FSO = CreateObject("Scripting.FileSystemObject")

REM Initialize Local Variables
DIM ProgramFilesx86 : ProgramFilesx86 = "C:\Program Files (x86)"

If FSO.FolderExists(ProgramFilesx86) then
OS = "Win7"
else
OS = "WinXP"
End If

REM Cleanup Local Variables
Set FSO = Nothing
Set ProgramFilesx86 = Nothing

End Sub

'*******************************************************************************

Sub InstallBentleyPrerequisites()

REM Define Local Objects
DIM cProc : Set cProc = Nothing
DIM iniProc : Set iniProc = Nothing
DIM oShell : Set oShell = CreateObject("WScript.Shell")
DIM Process : Process = "mshta.exe"
DIM sQuery : Set sQuery = Nothing
DIM SVC : Set SVC = GetObject("winmgmts:root\cimv2")

REM Define Local Variables
DIM Install : Install = RelativePath & "PrerequisitesGUI.hta"

oShell.Run Install, 7, true
Wscript.Sleep 1000
sQuery = "select * from win32_process where name=" & Chr(39) & Process & Chr(39)
set cProc = SVC.execquery(sQuery)
iniProc = cProc.count
Do While iniProc = 1
wscript.sleep 1000
sQuery = "select * from win32_process where name=" & Chr(39) & Process & Chr(39)
Set cProc = SVC.execquery(sQuery)
iniProc = cProc.count
Loop

REM Cleanup Local Variables
Set cProc = Nothing
Set iniProc = Nothing
Set Install = Nothing
Set oShell = Nothing
Set Process = Nothing
Set sQuery = Nothing
Set SVC = Nothing

End Sub

'*******************************************************************************

Sub GlobalVariableCleanup()

Set LogFolder = Nothing
Set OS = Nothing
Set RelativePath = Nothing

End Sub
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
0
Note

Love the editing the .hta file! it really worked great. I did not have to create a vbscript to run it, just a command shell mshta <path to .hta file> and it detected and installed everything. thanks!

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

Bentley Prerequisites

Version

0

Questions & Answers (0)

Questions & Answers related to Bentley Systems, Inc. Bentley Prerequisites

Blogs (0)

Blog posts related to Bentley Systems, Inc. Bentley Prerequisites

Reviews (0)

Reviews related to Bentley Systems, Inc. Bentley Prerequisites

 
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