3.9. adminstall.cfg


<< Prev   Next >>

adminstall.cfg dosyası, 1C:Enterprise uygulamasının Windows yönetim araçları kullanılarak yüklendiğini gösterir. Dosya, 1C:Enterprise konfigürasyon dosyaları dizininde bulunur. UTF-8 kodlamalı bir metin belgesidir.

Dosya, kurulum modunu tanımlayan tek bir satır içerebilir:

AdmInstall=<Mode>
<Mode>

Kurulum modunu açıklar:

  • Logon. Kurulum, kullanıcı etki alanında oturum açarken bir oturum açma komut dosyası kullanılarak gerçekleştirilir.
  • Restart. Grup politikaları kullanılarak gerçekleştirilen kurulum.

Aşağıda, 1C:Enterprise uygulamasını Windows Yönetimsel Araçları kullanılarak yüklemek için uygulanabilecek bir kurulum komut dosyası örneği verilmiştir.

Option Explicit

' Change user interface
Const msiUILevelNoChange = 0
' Use the default user interface
Const msiUILevelDefault = 1
' Do not display user interface (silent installation)
Const msiUILevelNone = 2
' Display only progress indicator and errors
Const msiUILevelBasic = 3
' User interface without dialog messages
Const msiUILevelReduced = 4
' Tam kullanıcı arayüzü
Const msiUILevelFull = 5
' For msiUILevelBasic, progress indicator
' is displayed without the Cancel button.
Const msiUILevelHideCancel = 32
' For msiUILevelBasic, progress indicator
' hata mesajları dahil iletişim kutusu olmadan görüntülenir.
Const msiUILevelProgressOnly = 64
' If used with any of the listed values, the installer
' displays a message about the final result at the end of the installation.
Const msiUILevelEndDialog = 128

'***** Must be changed to the actual installation directory
Const DistrFolder="\\Server\1CDistr\"

Const shortcutName = "1C:Enterprise startup"
Dim shortcutTarget : shortcutTarget = DistrFolder & "1cestart.exe"

' Constants for defining the action
' installation required
Const requiredInstall = 1
' uninstallation required
Const requiredUninstall = 0

' Value of ProductCode parameter from the setup.ini file ...
'... of the version to uninstall
Const unInstallUID="{9173B91C-FF56-4F25-82D1-7F68244044CD}"
'... of the version to install
Const InstallUID="{0BC98727-04AD-470F-9EEE-0162C543833F}"

' procedure for installing or uninstalling the specified version of the product
Sub installOrUninstall (ByVal productCode, ByVal msiPackage, ByVal mstTransform, ByVal requiredAction)
' productCode - Product code information. Located in the file
' setup.ini, ProductCode key
' msiPackage - 1C:Enterprise distribution package
'mstTransform - language conversion file for installer
' requiredAction - required action, either requiredInstall or
' requiredUninstall

' Variable to generate additional
' parameters for installer
Dim cmdLine

On Error Resume Next

Dim installer, session

Set installer = Nothing
Set session = Nothing
Set installer = Wscript.CreateObject("WindowsInstaller.Installer") : processError
installer.UILevel = msiUILevelBasic 'msiUILevelNone 'or specify another user interface option
' product installation checking
Set session = installer.OpenProduct(productCode)

If session Is Nothing AND requiredAction = requiredInstall Then
' product is not installed, installation required
cmdLine = "TRANSFORMS=adminstallrelogon.mst;"
If Not mstTransform Is Empty Then
' belirtilen dili kullanmak için yükleyiciye talimat ekle
cmdLine = cmdLine & mstTransform
' you may additionally specify which components to install
'cmdLine = cmdLine & " DESIGNERALLCLIENTS=1 THINCLIENT=1 WEBSERVEREXT=0 SERVER=0 CONFREPOSSERVER=0 CONVERTER77=0 SERVERCLIENT=1 LANGUAGES=RU"
End If
' installing the platform
Set session = installer.InstallProduct(msiPackage, cmdLine) : processError
' masaüstünde kısayol oluştur
createShurtcut()

ElsIf Not session Is Nothing AND requiredAction = requiredUninstall Then
' platform is already installed, uninstallation required
' only one session object is allowed
Set session = Nothing
' specifying that this version should be removed from the user's computer
cmdLine = "REMOVE=ALL"
' uninstalling
Set session = installer.InstallProduct(msiPackage, cmdLine) : processError
End If

Set session = Nothing
Set installer = Nothing

End Sub


'hata işleme
Sub processError
Dim msg
If Err = 0 Then Exit Sub
msg = Err.Source & " " & Hex(Err) & ": " & Err.Description
Wscript.Echo msg
Wscript.Quit 2
End Sub

'creating a shortcut
Sub createShurtcut
Dim WshShell, oShellLink
Set WshShell = WScript.CreateObject("WScript.Shell")
Dim strDesktop : strDesktop = WshShell.SpecialFolders("Desktop")
Set oShellLink = WshShell.CreateShortcut(strDesktop & "\" & shortcutName & ".lnk")
oShellLink.TargetPath = shortcutTarget
oShellLink.WindowStyle = 1
oShellLink.Description = shortcutName
oShellLink.Save
Set oShellLink = Nothing
Set WshShell = Nothing
End Sub

' uninstalling version 260
installOrUninstall unInstallUID, DistrFolder + "8.2.9.260\setup\1CEnterprise 8.2.msi", "1049.mst", requiredUninstall
' installing version 356
installOrUninstall InstallUID, DistrFolder + "8.2.9.356\setup\1CEnterprise 8.2.msi", "1049.mst", requiredInstall

<< Prev   Next >>

Icon/Social/001 Icon/Social/006 Icon/Social/005 Icon/Social/004 Icon/Social/002