@ECHO OFF
@cd /d "%~dp0"
start /wait msiexec /i DesktopCentralAgent.msi TRANSFORMS="DesktopCentralAgent.mst" ENABLESILENT=yes REBOOT=ReallySuppress /qn INSTALLSOURCE=Manual SERVER_ROOT_CRT="%cd%\DMRootCA-Server.crt" DS_ROOT_CRT="%cd%\DMRootCA.crt" /lv Agentinstalllog.txt
|
'Script to Install Desktop Central Agent '========================================== 'To install agent with the share path given as argument '=================================================================== On Error Resume Next Set WshShell = WScript.CreateObject("WScript.Shell") Set WshSysEnv = WshShell.Environment("Process") DrivePath = WshShell.ExpandEnvironmentStrings("%SYSTEMDRIVE%") checkOSArch = WshShell.RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE") if Err Then Err.Clear regkey = "HKEY_LOCAL_MACHINE\SOFTWARE\AdventNet\DesktopCentral\DCAgent\" else if checkOSArch = "x86" Then regkey = "HKEY_LOCAL_MACHINE\SOFTWARE\AdventNet\DesktopCentral\DCAgent\" else regkey = "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\AdventNet\DesktopCentral\DCAgent\" End IF End If ' Get Location and arguments of the script 'currdir = WSCript.Arguments.Item(0) currdir = WshShell.currentDirectory agentVersion = WshShell.RegRead(regkey&"DCAgentVersion") if Err Then Err.Clear msiFile = WSCript.Arguments.Item(0) mstFile = WSCript.Arguments.Item(1) WshShell.Run "msiexec.exe /i """&currdir&"\"&msiFile&""" TRANSFORMS="""&mstFile&""" ENABLESILENT=yes REBOOT=ReallySuppress /qn MSIRESTARTMANAGERCONTROL=Disable INSTALLSOURCE=GPO /lv "&DrivePath&"\dcagentInstaller.log",0,True End If |