Формировали и пакет msi для развертывания (есть для этого программы), но не вижу я смысла в установке клиента на все машины. Равернули на одну станцию, сформировали рабочую директорию с набором файлов и копируйте.
Достаточно скрипта:
Код:
Dim DesktopPath, Shortcut
Dim UserName, SDrive
Dim WshShell, ObjEnv, Wscr
Dim fso
Dim VerCL, VerSRV
Dim ProgPath, WorkPath, LnkPath, TagPath, CfgPath, DPath
Dim oFolder, oFile, file
Const ClientPath = "шара, где лежит клиент"
Const DestPath = "%SYSTEMDRIVE%\Program Files\Navision\Axapta\Client\Bin"
Const Cfg1 ="что-то -user=" --путь до конфигурациооного файла и параметр для имени, если нужно
Set fso = createobject("Scripting.FileSystemObject")
Set WshShell = CreateObject("WScript.Shell")
Set ObjEnv = WshShell.Environment("Process")
SDrive = ObjEnv("SYSTEMDRIVE")
ProgPath = SDrive + "\Program Files\Navision\Axapta\Client\Bin"
DPath = WshShell.ExpandEnvironmentStrings(DestPath)
If (Not fso.FileExists(ProgPath & "\Ax32.exe")) Then
If (Not fso.FolderExists(SDrive & "\Program Files\Navision")) Then
fso.CreateFolder(SDrive & "\Program Files\Navision")
End If
If (Not fso.FolderExists(SDrive & "\Program Files\Navision\Axapta")) Then
fso.CreateFolder(SDrive & "\Program Files\Navision\Axapta")
End If
If (Not fso.FolderExists(SDrive & "\Program Files\Navision\Axapta\Client")) Then
fso.CreateFolder(SDrive & "\Program Files\Navision\Axapta\Client")
End If
If (Not fso.FolderExists(SDrive & "\Program Files\Navision\Axapta\Client\Bin")) Then
fso.CreateFolder(SDrive & "\Program Files\Navision\Axapta\Client\Bin")
End If
fso.CopyFile (ClientPath & "\*.*"), DPath
DesktopPath = WshShell.SpecialFolders("Desktop")
TagPath = DPath & "\Ax32.exe"
If (Not fso.FileExists(DesktopPath & "\Axapta.lnk")) Then
Set Shortcut = WshShell.CreateShortcut(DesktopPath & "\Axapta.lnk")
Shortcut.TargetPath = """" & TagPath & """"
Shortcut.Arguments = Cfg1
Shortcut.WorkingDirectory = DPath
Shortcut.IconLocation = (DPath & "\Ax32.exe,0")
Shortcut.WindowStyle = 1
Shortcut.Save
End If
Else
VerCL = fso.GetFileVersion(ProgPath & "\Ax32.exe")
VerSRV = fso.GetFileVersion(ClientPath & "\Ax32.exe")
If (VerSRV <> VerCL) Then
set oFolder = fso.GetFolder(DPath)
Set oFile = oFolder.Files
For Each i In oFile
file = oFolder.Path & "\" & i.Name
fso.DeleteFile file, true
Next
fso.CopyFile (ClientPath & "\*.*"), DPath
End If
End If