# ============================================================ # Application Deployment Script # Copies files, creates registry keys, registers x86 DLLs # ============================================================ $ErrorActionPreference = "Stop" # ------------------------------------------------------------ # CONFIGURATION # ------------------------------------------------------------ $SourceFolder = "C:\Vector Data\Vector Downloads\VIZOR Setup\Setup" $DllInstallFolder = "${env:ProgramFiles(x86)}\Common Files\MetaQuest" $ServerInstallFolder = "D:\Program Files (x86)\Vector\ConnectServer" $ToolsInstallFolder = "D:\Program Files (x86)\Vector\ConnectTools" $LogFile = "C:\Vector Data\VIZOR_Install.log" # DLLs to register $comdlls = @( "MqAdmin.dll" "MqCenBranding.dll" "MqCenCnfg.dll" "MqCenInt.tlb" "MqCensusWeb65.dll" "MqCensusWebWC45.dll" "MqCenUpgrade45.dll" "MqCenX20.dll" "MqCESetupCnfg.dll" "MqCR9.dll" "MqCRRpt11.dll" "MqDBTools404.dll" "MqeDict.dll" "MqeDictWC.dll" "MqNotifications.dll" "MqReport5.dll" "MqReportWC45.dll" "MqRules.dll" "MqRulesWC.dll" "MqSQL10.dll" "Mqsysutils40.dll" "MqUploadFiles.dll" "MqUploadFilesWC.dll" "MqUsersWC55.dll" "MqWebAdmin45.dll" "MqWebAdminWC50.dll" "MqWVD.dll" "MqWVE.dll" "MqXDataViewWC.dll" "ChilkatAx-9.5.0-win32.dll" "VSRESIZE.OCX" ) # ------------------------------------------------------------ # LOGGING # ------------------------------------------------------------ function Write-Log { param ( [string]$Message ) $Time = Get-Date -Format "yyyy-MM-dd HH:mm:ss" $Line = "[$Time] $Message" Write-Host $Line Add-Content -Path $LogFile -Value $Line } Write-Log "==========================================" Write-Log "Starting VIZOR installation" Write-Log "==========================================" # ------------------------------------------------------------ # CHECK ADMINISTRATOR # ------------------------------------------------------------ $IsAdmin = ([Security.Principal.WindowsPrincipal] ` [Security.Principal.WindowsIdentity]::GetCurrent() ).IsInRole( [Security.Principal.WindowsBuiltInRole]::Administrator ) if (-not $IsAdmin) { Write-Log "ERROR: Script must be run as Administrator." exit 1 } # ------------------------------------------------------------ # CREATE INSTALLATION DIRECTORIES # ------------------------------------------------------------ Write-Log "Creating installation directories..." New-Item ` -ItemType Directory ` -Path $DllInstallFolder ` -Force | Out-Null New-Item ` -ItemType Directory ` -Path $ServerInstallFolder ` -Force | Out-Null New-Item ` -ItemType Directory ` -Path $ToolsInstallFolder ` -Force | Out-Null # ------------------------------------------------------------ # COPY FILES # ------------------------------------------------------------ Write-Log "Copying application files..." try { Copy-Item ` -Path "$SourceFolder\Redistrib\Windows\*" ` -Destination $env:windir ` -Recurse ` -Force Copy-Item ` -Path "$SourceFolder\MetaQuest\*" ` -Destination $DllInstallFolder ` -Recurse ` -Force Copy-Item ` -Path "$SourceFolder\Server\*" ` -Destination $ServerInstallFolder ` -Recurse ` -Force Copy-Item ` -Path "$SourceFolder\Tools\*" ` -Destination $ToolsInstallFolder ` -Recurse ` -Force Write-Log "Files copied successfully." } catch { Write-Log "ERROR copying files: $($_.Exception.Message)" exit 1 } # ------------------------------------------------------------ # CREATE REGISTRY KEYS # ------------------------------------------------------------ #Requires -RunAsAdministrator <# MetaQuest Census Registry Configuration Array-based PowerShell implementation Equivalent to the supplied .REG file. The script explicitly uses the 32-bit registry view: HKLM\SOFTWARE\MetaQuest This corresponds to: HKLM\SOFTWARE\Wow6432Node\MetaQuest #> Set-StrictMode -Version Latest $ErrorActionPreference = 'Stop' # ============================================================ # Registry setup # ============================================================ $RegistryView = [Microsoft.Win32.RegistryView]::Registry32 $BaseKey = [Microsoft.Win32.RegistryKey]::OpenBaseKey( [Microsoft.Win32.RegistryHive]::LocalMachine, $RegistryView ) # ============================================================ # Registry data # # Type: # String # DWord # QWord # ExpandString # MultiString # Binary # # Name = '' represents the default registry value (@=) # ============================================================ $RegistryEntries = @( # -------------------------------------------------------- # MetaQuest # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest' Name = 'EventLogLevel' Type = 'DWord' Value = 5 } # -------------------------------------------------------- # Census 7.3 # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.3\Census\General' Name = 'AnonymousBindEnabledLDAP' Type = 'String' Value = '0' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.3\Census\General' Name = 'ImportADPageSize' Type = 'String' Value = '999' } # -------------------------------------------------------- # Census 7.6 - General # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\General' Name = 'InstallDir' Type = 'String' Value = 'D:\Program Files (x86)\Vector\ConnectTools' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\General' Name = 'Network.Path' Type = 'String' Value = 'D:\Program Files (x86)\Vector\ConnectServer' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\General' Name = 'Mail' Type = 'String' Value = 'VIM-Compliant (e.g.: Lotus cc:Mail)' } # -------------------------------------------------------- # Census Version # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\CensusVersion' Name = 'Language' Type = 'String' Value = 'En_US' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\CensusVersion' Name = 'Major' Type = 'String' Value = '7' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\CensusVersion' Name = 'Minor' Type = 'String' Value = '60' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\CensusVersion' Name = 'Release Type' Type = 'String' Value = 'Release' } # -------------------------------------------------------- # Customization # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\Customization' Name = 'Summary.Visible' Type = 'String' Value = 'True' } # -------------------------------------------------------- # Clipboard Formats # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Clipboard Formats' Name = 'HTML (*.htm; *.html)' Type = 'String' Value = 'soa900.dll,30,html,HTML Format,HTML(*.html),1' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Clipboard Formats' Name = 'Microsoft Active Server Pages (*.asp)' Type = 'String' Value = 'soa900.dll,37,asp,ASP,MicrosoftActiveServerPages(*.asp),53' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Clipboard Formats' Name = 'Microsoft Excel (*.xls)' Type = 'String' Value = 'soa900.dll,8,xls,Biff5,MicrosoftExcel(*.xls),0' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Clipboard Formats' Name = 'Microsoft IIS (*.htx; *.idc)' Type = 'String' Value = 'soa900.dll,34,htx,HTX,MicrosoftIIS(*.htx;*.idc),35' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Clipboard Formats' Name = 'MS-DOS Text (*.txt)' Type = 'String' Value = 'soa900.dll,10,txt,7,MS-DOSText(*.txt),0' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Clipboard Formats' Name = 'Rich Text Format (*.rtf)' Type = 'String' Value = 'soa900.dll,9,rtf,Rich Text Format,RichTextFormat(*.rtf),0' } # -------------------------------------------------------- # Jet - Engines # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\Engines' Name = 'SystemDB' Type = 'String' Value = 'D:\Program Files (x86)\Vector\ConnectServer\CenSys.mdw' } # -------------------------------------------------------- # ISAM Formats - Default # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats' Name = '' Type = 'String' Value = '' } # -------------------------------------------------------- # SQL Database # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\' Name = 'CanLink' Type = 'String' Value = '1' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\' Name = 'CreateDBOnExport' Type = 'String' Value = '0' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\' Name = 'ExportFilter' Type = 'String' Value = 'ODBC Databases ()' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\' Name = 'ImportFilter' Type = 'String' Value = 'ODBC Databases ()' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\' Name = 'IndexDialog' Type = 'String' Value = '0' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\' Name = 'OneTablePerFile' Type = 'String' Value = '0' } # -------------------------------------------------------- # Excel formats # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Excel 3.0' Name = 'ImportWizardFunction' Type = 'String' Value = 'mx_entry' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Excel 4.0' Name = 'ImportWizardFunction' Type = 'String' Value = 'mx_entry' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Excel 5.0' Name = 'ImportWizardFunction' Type = 'String' Value = 'mx_entry' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Excel 8.0' Name = 'ImportWizardFunction' Type = 'String' Value = 'mx_entry' } # -------------------------------------------------------- # Exchange # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Exchange 4.0' Name = 'AutoRun' Type = 'String' Value = 'YES' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Exchange 4.0' Name = 'ImportWizardFunction' Type = 'String' Value = 'mx_entry' } # -------------------------------------------------------- # HTML Import # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\HTML Import' Name = 'ImportWizardFunction' Type = 'String' Value = 'mx_entry' } # -------------------------------------------------------- # Lotus # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Lotus WK1' Name = 'ImportWizardFunction' Type = 'String' Value = 'mx_entry' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Lotus WK3' Name = 'ImportWizardFunction' Type = 'String' Value = 'mx_entry' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Lotus WK4' Name = 'ImportWizardFunction' Type = 'String' Value = 'mx_entry' } # -------------------------------------------------------- # Microsoft Access # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Microsoft Access' Name = 'CanLink' Type = 'String' Value = '1' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Microsoft Access' Name = 'CreateDBOnExport' Type = 'String' Value = '0' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Microsoft Access' Name = 'ExportFilter' Type = 'String' Value = 'Microsoft Access (*.mdb;*.adp;*.mdw;*.mda;*.mde, *.ade)' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Microsoft Access' Name = 'ImportFilter' Type = 'String' Value = 'Microsoft Access (*.mdb;*.adp;*.mdw;*.mda;*.mde, *.ade)' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Microsoft Access' Name = 'IndexDialog' Type = 'String' Value = '0' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Microsoft Access' Name = 'OneTablePerFile' Type = 'String' Value = '0' } # -------------------------------------------------------- # Microsoft Access Data Access Page # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\MicrosoftAccessDataAccessPage' Name = 'DisableAutostart' Type = 'String' Value = 'Yes' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\MicrosoftAccessDataAccessPage' Name = 'DisableSelection' Type = 'String' Value = 'Yes' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\MicrosoftAccessDataAccessPage' Name = 'ExportFilter' Type = 'String' Value = 'Microsoft Access Data Access Page (*.htm; *.html)' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\MicrosoftAccessDataAccessPage' Name = 'OneTablePerFile' Type = 'String' Value = '1' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\MicrosoftAccessDataAccessPage' Name = 'OutputFormat' Type = 'String' Value = 'Microsoft Access Data Access Page (*.htm; *.html)' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\MicrosoftAccessDataAccessPage' Name = 'TextualOutput' Type = 'String' Value = 'Yes' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\MicrosoftAccessDataAccessPage' Name = 'CanExportToDAP' Type = 'String' Value = 'Yes' } # -------------------------------------------------------- # Microsoft Active Server Pages # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\MicrosoftActiveServerPages' Name = 'DisableAutostart' Type = 'String' Value = 'Yes' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\MicrosoftActiveServerPages' Name = 'DisableSelection' Type = 'String' Value = 'Yes' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\MicrosoftActiveServerPages' Name = 'ExportFilter' Type = 'String' Value = 'Microsoft Active Server Pages (*.asp)' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\MicrosoftActiveServerPages' Name = 'OneTablePerFile' Type = 'String' Value = '1' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\MicrosoftActiveServerPages' Name = 'OutputFormat' Type = 'String' Value = 'Microsoft Active Server Pages (*.asp)' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\MicrosoftActiveServerPages' Name = 'TextualOutput' Type = 'String' Value = 'Yes' } # -------------------------------------------------------- # Microsoft IIS # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\MicrosoftIIS' Name = 'DisableAutostart' Type = 'String' Value = 'Yes' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\MicrosoftIIS' Name = 'DisableSelection' Type = 'String' Value = 'Yes' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\MicrosoftIIS' Name = 'ExportFilter' Type = 'String' Value = 'Microsoft IIS 1-2 (*.htx; *.idc)' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\MicrosoftIIS' Name = 'OneTablePerFile' Type = 'String' Value = '1' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\MicrosoftIIS' Name = 'OutputFormat' Type = 'String' Value = 'Microsoft IIS (*.htx; *.idc)' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\MicrosoftIIS' Name = 'TextualOutput' Type = 'String' Value = 'Yes' } # -------------------------------------------------------- # Outlook # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Outlook 9.0' Name = 'AutoRun' Type = 'String' Value = 'YES' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Outlook 9.0' Name = 'ImportWizardFunction' Type = 'String' Value = 'mx_entry' } # -------------------------------------------------------- # Rich Text Format # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Rich Text Format' Name = 'ExportFilter' Type = 'String' Value = 'Rich Text Format (*.rtf)' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Rich Text Format' Name = 'OneTablePerFile' Type = 'String' Value = '1' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Rich Text Format' Name = 'OutputFormat' Type = 'String' Value = 'Rich Text Format (*.rtf)' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Rich Text Format' Name = 'ReportFormat' Type = 'String' Value = 'Rich Text Format' } # -------------------------------------------------------- # Snapshot Format # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Snapshot Format' Name = 'ExportFilter' Type = 'String' Value = 'Snapshot Format (*.snp)' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Snapshot Format' Name = 'OutputToOnly' Type = 'String' Value = 'Yes' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Snapshot Format' Name = 'ReportFormat' Type = 'String' Value = 'Snapshot Format' } # -------------------------------------------------------- # Text # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Text' Name = 'ExportWizardFunction' Type = 'String' Value = 'mx_entry' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Text' Name = 'ImportWizardFunction' Type = 'String' Value = 'mx_entry' } # -------------------------------------------------------- # Word for Windows Merge # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Word for Windows Merge' Name = 'ConnectSub' Type = 'String' Value = 'Text;FMT=WordMerge' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Word for Windows Merge' Name = 'Engine' Type = 'String' Value = 'Text' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Word for Windows Merge' Name = 'ExportFilter' Type = 'String' Value = 'Microsoft Word Merge (*.txt)' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Word for Windows Merge' Name = 'ISAMType' Type = 'String' Value = '2' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Jet\4.0\ISAM Formats\Word for Windows Merge' Name = 'OneTablePerFile' Type = 'String' Value = '1' } # -------------------------------------------------------- # RefLibPaths # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\RefLibPaths' Name = 'AdmLib.MDe' Type = 'String' Value = 'D:\Program Files (x86)\Vector\ConnectTools' } # -------------------------------------------------------- # Report Formats # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Report Formats' Name = 'HTML' Type = 'String' Value = 'html,SOA_RptToHtml,1,HTML (*.html),1' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Report Formats' Name = 'Microsoft Excel' Type = 'String' Value = 'xls,SOA_RptToBIFF, Biff5,Microsoft Excel (*.xls),0' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Report Formats' Name = 'MS-DOS Text' Type = 'String' Value = 'txt,SOA_RptToAscii,1,MS-DOS Text (*.txt),0' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Report Formats' Name = 'Rich Text Format' Type = 'String' Value = 'rtf,SOA_RptToRTF,Rich Text Format,Rich Text Format (*.rtf),0' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Report Formats' Name = 'Snapshot Format' Type = 'String' Value = 'snp,,1,Snapshot Format (*.snp),0' } # -------------------------------------------------------- # Run-Time Options # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Run-Time Options' Name = 'HelpFile' Type = 'String' Value = 'D:\Program Files (x86)\Vector\ConnectTools\Help\Client\Census.chm' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Run-Time Options' Name = 'Icon' Type = 'String' Value = 'D:\Program Files (x86)\Vector\ConnectTools\Census.ico' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\9.0\Run-Time Options' Name = 'TitleBar' Type = 'String' Value = 'Admin' } # -------------------------------------------------------- # Options # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\Options' Name = 'Logverbose' Type = 'String' Value = '' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\Options' Name = 'AdminMdbVersion' Type = 'DWord' Value = 0 } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\Options' Name = 'AdminLibVersion' Type = 'DWord' Value = 0 } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\Options' Name = 'AutoRepair' Type = 'DWord' Value = 1 } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\Options' Name = 'ComponentsToUpgrade' Type = 'DWord' Value = 0 } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\Options' Name = 'LastProject' Type = 'String' Value = 'Bugtrk' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\Options' Name = 'NewInstallation' Type = 'DWord' Value = 3 } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\Options' Name = 'Recovery' Type = 'DWord' Value = 1 } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\Options' Name = 'SystemMdaVersion' Type = 'DWord' Value = 0 } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\Options' Name = 'SystemMda' Type = 'String' Value = 'D:\Program Files (x86)\Vector\ConnectServer\CenSys.mdw' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\Options' Name = 'SystemAdminMdb' Type = 'String' Value = 'D:\Program Files (x86)\Vector\ConnectServer\Setup\admin.mdb' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\Options' Name = 'LogonUser' Type = 'String' Value = 'Admin' } # -------------------------------------------------------- # Window Coordinates # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\WindowCoords' Name = 'frmDts' Type = 'String' Value = '291,101,896,711' } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\WindowCoords' Name = 'Summary.Height' Type = 'DWord' Value = 0xA03 } @{ Path = 'SOFTWARE\MetaQuest\Census 7.6\Census\WindowCoords' Name = 'Toolbar.Height' Type = 'DWord' Value = 0x37C } # ======================================================== # CensusWeb # ======================================================== @{ Path = 'SOFTWARE\MetaQuest\CensusWeb' Name = 'CensusPath' Type = 'String' Value = 'D:\program files (x86)\vector\connectserver' } @{ Path = 'SOFTWARE\MetaQuest\CensusWeb\HealthMonitor' Name = 'State' Type = 'String' Value = 'True' } @{ Path = 'SOFTWARE\MetaQuest\CensusWeb\Options' Name = 'SetZone' Type = 'String' Value = '1' } # -------------------------------------------------------- # CensusWeb Server # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\CensusWeb\Server\1.0' Name = 'LinkFromWeb' Type = 'DWord' Value = 0 } @{ Path = 'SOFTWARE\MetaQuest\CensusWeb\Server\1.0' Name = 'UncToLocal' Type = 'DWord' Value = 1 } @{ Path = 'SOFTWARE\MetaQuest\CensusWeb\Server\1.0' Name = 'EnableLog' Type = 'DWord' Value = 1 } # -------------------------------------------------------- # WebViewEditor # -------------------------------------------------------- @{ Path = 'SOFTWARE\MetaQuest\CensusWeb\WebViewEditor\1.0' Name = 'InstallDir' Type = 'String' Value = 'D:\Program Files (x86)\Vector\ConnectTools' } @{ Path = 'SOFTWARE\MetaQuest\CensusWeb\WebViewEditor\1.0' Name = 'SupportType' Type = 'String' Value = 'SupportLocal' } @{ Path = 'SOFTWARE\MetaQuest\CensusWeb\WebViewEditor\1.0' Name = 'SupportLocal' Type = 'String' Value = 'D:\Program Files (x86)\Vector\ConnectTools\support\TriageClient.exe /profile="http://www.metaquest.com/web/support/census/census50.trp" /mail=support@metaquest.com /mode=Wizard' } @{ Path = 'SOFTWARE\MetaQuest\CensusWeb\WebViewEditor\1.0' Name = 'SupportWeb' Type = 'String' Value = 'http://www.metaquest.com/Support/AutomatedSupport/index.html' } @{ Path = 'SOFTWARE\MetaQuest\CensusWeb\WebViewEditor\1.0' Name = 'UpdateTable' Type = 'DWord' Value = 0 } @{ Path = 'SOFTWARE\MetaQuest\CensusWeb\WebViewEditor\1.0' Name = 'WebViewEditorDB' Type = 'String' Value = 'D:\program files (x86)\vector\connectserver\censusweb.mdb' } @{ Path = 'SOFTWARE\MetaQuest\CensusWeb\WebViewEditor\1.0' Name = 'AppPoolLoadBal' Type = 'DWord' Value = 5 } @{ Path = 'SOFTWARE\MetaQuest\CensusWeb\WebViewEditor\1.0' Name = 'UnicodeCaptions' Type = 'DWord' Value = 0 } @{ Path = 'SOFTWARE\MetaQuest\CensusWeb\WebViewEditor\1.0' Name = 'UseAbsoluteReferencePaths' Type = 'DWord' Value = 0 } @{ Path = 'SOFTWARE\MetaQuest\CensusWeb\WebViewEditor\1.0' Name = 'LogonUser' Type = 'String' Value = 'Admin' } @{ Path = 'SOFTWARE\MetaQuest\CensusWeb\WebViewEditor\1.0' Name = 'ValidateVDServer' Type = 'DWord' Value = 1 } ) # ============================================================ # Apply registry entries # ============================================================ try { foreach ($Entry in $RegistryEntries) { $Key = $null try { # Create the key and all parent keys $Key = $BaseKey.CreateSubKey($Entry.Path) if ($null -eq $Key) { throw "Unable to create registry key: $($Entry.Path)" } # Convert PowerShell type to RegistryValueKind $RegistryType = [Microsoft.Win32.RegistryValueKind]::$($Entry.Type) # Empty name means the default registry value $Key.SetValue( $Entry.Name, $Entry.Value, $RegistryType ) Write-Host "OK: $($Entry.Path)\$($Entry.Name)" -ForegroundColor Green } catch { Write-Error "FAILED: $($Entry.Path)\$($Entry.Name) - $($_.Exception.Message)" throw } finally { if ($null -ne $Key) { $Key.Dispose() } } } } finally { if ($null -ne $BaseKey) { $BaseKey.Dispose() } } Write-Host "" Write-Host "==============================================" -ForegroundColor Green Write-Host "MetaQuest Census registry configuration done." -ForegroundColor Green Write-Host "==============================================" -ForegroundColor Green # ------------------------------------------------------------ # REGISTER DLLs # ------------------------------------------------------------ $RegSvr32 = "$env:WINDIR\SysWOW64\regsvr32.exe" Write-Log "Using x86 RegSvr32: $RegSvr32" foreach ($Dll in $comdlls) { $DllPath = Join-Path $DllInstallFolder $Dll if (-not (Test-Path $DllPath)) { Write-Log "WARNING: DLL not found: $DllPath" continue } Write-Log "Registering DLL: $DllPath" try { $LASTEXITCODE = 0 & $RegSvr32 /s $DllPath $ExitCode = $LASTEXITCODE if ($ExitCode -eq 0) { Write-Log "SUCCESS: $Dll" } else { Write-Log "FAILED: $Dll - RegSvr32 exit code: $ExitCode" } } catch { Write-Log "ERROR registering $Dll : $($_.Exception.Message)" } } # ------------------------------------------------------------ # CREATE START MENU SHORTCUTS # ------------------------------------------------------------ $StartMenuFolder = "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\Vector\VIZOR" Write-Log "Creating Start Menu shortcuts..." New-Item ` -ItemType Directory ` -Path $StartMenuFolder ` -Force | Out-Null $WshShell = New-Object -ComObject WScript.Shell #Web View Editor $TargetPath = "$ToolsInstallFolder\webvieweditor.exe" $Shortcut = $WshShell.CreateShortcut("$StartMenuFolder\Web View Editor.lnk") $Shortcut.TargetPath = $TargetPath $Shortcut.WorkingDirectory = $InstallFolder $Shortcut.Description = "Web View Editor" $Shortcut.IconLocation = "$TargetPath,0" $Shortcut.Save() Write-Log "Start Menu shortcut created: $ShortcutPath" #Import Manager $TargetPath = "$ToolsInstallFolder\MqAccounts.exe" $Shortcut = $WshShell.CreateShortcut("$StartMenuFolder\VIZOR Import Manager.lnk") $Shortcut.TargetPath = $TargetPath $Shortcut.WorkingDirectory = $InstallFolder $Shortcut.Description = "VIZOR Import Manager" $Shortcut.IconLocation = "$TargetPath,0" $Shortcut.Save() Write-Log "Start Menu shortcut created: $ShortcutPath" #VIZOR Admin #$TargetPath = "D:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.EXE" #$Arguments = '"$ToolsInstallFolder\admin.accdb" /runtime /excl /profile "Census" /user cenjetuser /x mcrrun /wrkgrp "$ToolsInstallFolder\censys.mdw"' #$Shortcut = $WshShell.CreateShortcut("$StartMenuFolder\VIZOR Admin.lnk") #$Shortcut.TargetPath = $TargetPath #$Shortcut.Arguments = $Arguments #$Shortcut.WorkingDirectory = $InstallFolder #$Shortcut.Description = "VIZOR Admin" #$Shortcut.IconLocation = "$TargetPath,0" #$Shortcut.Save() #Write-Log "Start Menu shortcut created: $ShortcutPath" #Generate Web Admin #$TargetPath = "$DllInstallFolder\MqSetup.exe" #$Arguments = "/IniFile GenerateWebAdmin.ini" #$Shortcut = $WshShell.CreateShortcut("$StartMenuFolder\VIZOR Tools\Generate Web Admin.lnk") #$Shortcut.TargetPath = $TargetPath #$Shortcut.Arguments = $Arguments #$Shortcut.WorkingDirectory = $InstallFolder #$Shortcut.Description = "Generate Web Admin" #$Shortcut.IconLocation = "$TargetPath,0" #$Shortcut.Save() #Write-Log "Start Menu shortcut created: $ShortcutPath" #Generate Web Views #$TargetPath = "$DllInstallFolder\MqSetup.exe" #$Arguments = "/IniFile GenerateViews.ini" #$Shortcut = $WshShell.CreateShortcut("$StartMenuFolder\VIZOR Tools\Generate Web Views.lnk") #$Shortcut.TargetPath = $TargetPath #$Shortcut.Arguments = $Arguments #$Shortcut.WorkingDirectory = $InstallFolder #$Shortcut.Description = "Generate Web Views" #$Shortcut.IconLocation = "$TargetPath,0" #$Shortcut.Save() #Write-Log "Start Menu shortcut created: $ShortcutPath" # ------------------------------------------------------------ # FINISHED # ------------------------------------------------------------ Write-Log "==========================================" Write-Log "Installation completed." Write-Log "Log file: $LogFile" Write-Log "=========================================="