Homer Posted August 27, 2013 Posted August 27, 2013 Morning all, We're trying to install Solus3 using Capita's scripts which we can get by exporting the install files from Solus3, however there is no directives in the scripts to run the install silently or to accept the EULA. We think we've passed an argument to accept the EULA but we can't get the installer to run silently... so I'm hoping one of you knows jscript so that we can have great success? Below is what we've got at the moment. I'm sure the solution is simple but I am stupid when it comes to code. I would have put this in MIS forum but I'm hoping more exposure to people with coding brains in this forum. Thanks all var wshShell, wshSysEnv; var fso, f1, typeLib; fso = new ActiveXObject("Scripting.FileSystemObject"); typeLib = new ActiveXObject("Scriptlet.TypeLib"); wshShell = WScript.CreateObject("WScript.Shell"); var logFileName = WScript.Arguments(0); var agentAddress = WScript.Arguments(1); var dsAddress = WScript.Arguments(2); var keyFileName = WScript.Arguments(3); var msi32 = WScript.Arguments(4); var msi64 = WScript.Arguments(5); var msi = ""; var license = "1" if (is64()) msi = msi64; else msi = msi32; wshShell.Run("msiexec.exe /lv* \"" + fso.BuildPath(wshShell.Environment("SYSTEM")("TEMP"), logFileName) + "\" /i \"" + wshShell.CurrentDirectory + "\\" + msi + "\" ""/qr"" \"" "\" AGENTSERVICEADDRESS=\"" + agentAddress + "\" AGENTID=\"" + typeLib.Guid.toString().substring(0, 38) + "\" DEPLOYMENTSERVERADDRESS=\"" + dsAddress + "\" RSAKEYPATH=\"" + wshShell.CurrentDirectory + "\" LicenseAccepted=\"" + license + "\"", 0, true); function is64() { var shell = WScript.CreateObject("WScript.Shell"); return (wshShell.Environment("SYSTEM")("PROCESSOR_ARCHITECTURE").indexOf("64") + 1); }
Alpinestar777 Posted November 21, 2013 Posted November 21, 2013 Hi there Am looking into the same thing, did you ever get this working silently ?
markwilfan Posted July 22, 2014 Posted July 22, 2014 (edited) Not sure you solved this but here is my twopeneth worth var wshShell, wshSysEnv; var fso, f1, typeLib; fso = new ActiveXObject("Scripting.FileSystemObject"); typeLib = new ActiveXObject("Scriptlet.TypeLib"); wshShell = WScript.CreateObject("WScript.Shell"); var logFileName = WScript.Arguments(0); var agentAddress = WScript.Arguments(1); var dsAddress = WScript.Arguments(2); var keyFileName = WScript.Arguments(3); var msi32 = WScript.Arguments(4); var msi64 = WScript.Arguments(5); var msi = ""; if (is64()) msi = msi64; else msi = msi32; wshShell.run("msiexec.exe /qn /lv* \"" + fso.BuildPath(wshShell.Environment("SYSTEM")("TEMP"), logFileName) + "\" /i \"" + wshShell.CurrentDirectory + "\\" + msi + "\" AGENTSERVICEADDRESS=\"" + agentAddress + "\" AGENTID=\"" + typeLib.Guid.toString().substring(0, 38) + "\" DEPLOYMENTSERVERADDRESS=\"" + dsAddress + "\" RSAKEYPATH=\"" + wshShell.CurrentDirectory + "\"", 1, true); function is64() { var shell = WScript.CreateObject("WScript.Shell"); return (wshShell.Environment("SYSTEM")("PROCESSOR_ARCHITECTURE").indexOf("64") + 1); } add in /qn after msiexec to run quiet with no gui, then change the 0 for a 1 before true); (as above) Problem I have now is some PCs have dreamweaver set to open js files by default so will not run the js using a startup script *facepalm* Hope this helps somebody Edited July 22, 2014 by markwilfan
Arthur Posted July 22, 2014 Posted July 22, 2014 Problem I have now is some PCs have Dreamweaver set to open js files by default so will not run the js using a startup script Use the PowerShell App Deployment Toolkit. Problem solved! 1
markwilfan Posted July 24, 2014 Posted July 24, 2014 Thanks Arthur - nice script that PS deploy stuff Here is my PowerShell App Deployment Toolkit script if anybody wants it <# .SYNOPSIS This script performs the installation or uninstallation of an application(s). .DESCRIPTION The script is provided as a template to perform an install or uninstall of an application(s). The script either performs an "Install" deployment type or an "Uninstall" deployment type. The install deployment type is broken down in to 3 main sections/phases: Pre-Install, Install, and Post-Install. The script dot-sources the AppDeployToolkitMain.ps1 script which contains the logic and functions required to install or uninstall an application. To access the help section, .EXAMPLE Deploy-Application.ps1 .EXAMPLE Deploy-Application.ps1 -DeploymentMode "Silent" .EXAMPLE Deploy-Application.ps1 -AllowRebootPassThru -AllowDefer .EXAMPLE Deploy-Application.ps1 -Uninstall .PARAMETER DeploymentType The type of deployment to perform. [Default is "Install"] .PARAMETER DeployMode Specifies whether the installation should be run in Interactive, Silent or NonInteractive mode. Interactive = Default mode Silent = No dialogs NonInteractive = Very silent, i.e. no blocking apps. Noninteractive mode is automatically set if an SCCM task sequence or session 0 is detected. .PARAMETER AllowRebootPassThru Allows the 3010 return code (requires restart) to be passed back to the parent process (e.g. SCCM) if detected from an installation. If 3010 is passed back to SCCM a reboot prompt will be triggered. .PARAMETER TerminalServerMode Changes to user install mode and back to user execute mode for installing/uninstalling applications on Remote Destkop Session Host/Citrix servers .NOTES .LINK Http://psappdeploytoolkit.codeplex.com "#> Param ( [ValidateSet("Install","Uninstall")] [string] $DeploymentType = "Install", [ValidateSet("Interactive","Silent","NonInteractive")] [string] $DeployMode = "NonInteractive", [switch] $AllowRebootPassThru = $false, [switch] $TerminalServerMode = $false ) #*=============================================== #* VARIABLE DECLARATION Try { #*=============================================== #*=============================================== # Variables: Application $appVendor = "Capita SIMS" $appName = "SOLUS 3" $appVersion = "3.7.149.0" $appArch = "" $appLang = "EN" $appRevision = "01" $appScriptVersion = "1.0.0" $appScriptDate = "22/07/2014" $appScriptAuthor = "mwilfan" #*=============================================== # Variables: Script - Do not modify this section $deployAppScriptFriendlyName = "Deploy Application" $deployAppScriptVersion = [version]"3.1.4" $deployAppScriptDate = "06/10/2014" $deployAppScriptParameters = $psBoundParameters # Variables: Environment $scriptDirectory = Split-Path -Parent $MyInvocation.MyCommand.Definition # Dot source the App Deploy Toolkit Functions ."$scriptDirectory\AppDeployToolkit\AppDeployToolkitMain.ps1" #*=============================================== #* END VARIABLE DECLARATION #*=============================================== #*=============================================== #* PRE-INSTALLATION If ($deploymentType -ne "uninstall") { $installPhase = "Pre-Installation" #*=============================================== # Show Welcome Message, close Internet Explorer if required, allow up to 3 deferrals, verify there is enough disk space to complete the install and persist the prompt Show-InstallationWelcome -CloseApps "" -AllowDefer -DeferTimes 3 -CheckDiskSpace -PersistPrompt #remove all previous solus3 clients first #remove solus 3.5 Execute-MSI MsiExec.exe -Action Uninstall -Path "{62233362-EFBB-4998-B804-CD6C68C074F0}" -ContinueOnError $true #remove solus 3.6.92 Execute-MSI MsiExec.exe -Action Uninstall -Path "{DF59CCA1-C41C-40E4-AA7D-BD7768CD88BF}" -ContinueOnError $true Execute-MSI MsiExec.exe -Action Uninstall -Path "{5C360DA8-EFF1-4E79-A321-11427412755B}" -ContinueOnError $true #remove solus 3.6.94 Execute-MSI MsiExec.exe -Action Uninstall -Path "{07BA2744-05A6-42DC-85EC-D5316949F1F1}" -ContinueOnError $true Execute-MSI MsiExec.exe -Action Uninstall -Path "{3EF2D2B9-5937-49E0-823A-77DD319B6C1B}" -ContinueOnError $true #remove solus 3.7.147 Execute-MSI MsiExec.exe -Action Uninstall -Path "{FD0AF782-FC77-4601-AD42-37F9C215C28D}" -ContinueOnError $true #remove solus 3.7.149 - commented out but there is you need it #Execute-MSI MsiExec.exe -Action Uninstall -Path "{2D4BEB2F-3948-4822-A6ED-A4053867A736}" -ContinueOnError $true # Show Progress Message (with the default message) Show-InstallationProgress #*=============================================== #* INSTALLATION $installPhase = "Installation" #*=============================================== # Perform installation tasks here #generate a guid and pop it into a variable $solusguid = get-wmiobject Win32_ComputerSystemProduct | Select-Object -ExpandProperty UUID #install x64 solus3 client if x64 processor If ($psArchitecture -eq "x64") { Execute-MSI -Action Install -Path "SOLUS3AgentInstaller_x64.msi" ''AGENTID=$solusguid' RSAKEYPATH="" AGENTSERVICEADDRESS="net.tcp://localhost:52966" DEPLOYMENTSERVERADDRESS="net.tcp://:52965" /qn' -ContinueOnError $true} # else install the x84 solus3 client ElseIf ($psArchitecture -eq "x86") { Execute-MSI -Action Install -Path "SOLUS3AgentInstaller_x86.msi" ''AGENTID=$solusguid' RSAKEYPATH="" AGENTSERVICEADDRESS="net.tcp://localhost:52966" DEPLOYMENTSERVERADDRESS="net.tcp://:52965" /qn' -ContinueOnError $true} #*=============================================== #* POST-INSTALLATION $installPhase = "Post-Installation" #*=============================================== # Perform post-installation tasks here # Display a message at the end of the install Show-InstallationPrompt -Message "" -ButtonRightText "Ok" -Icon Information -NoWait #*=============================================== #* UNINSTALLATION } ElseIf ($deploymentType -eq "uninstall") { $installPhase = "Uninstallation" #*=============================================== # Show Welcome Message, close Internet Explorer if required with a 60 second countdown before automatically closing Show-InstallationWelcome -CloseApps "iexplore" -CloseAppsCountdown "60" # Show Progress Message (with the default message) Show-InstallationProgress # Perform uninstallation tasks here #*=============================================== #* END SCRIPT BODY } } Catch { $exceptionMessage = "$($_.Exception.Message) `($($_.ScriptStackTrace)`)"; Write-Log "$exceptionMessage"; Show-DialogBox -Text $exceptionMessage -Icon "Stop"; Exit-Script -ExitCode 1 } # Catch any errors in this script Exit-Script -ExitCode 0 # Otherwise call the Exit-Script function to perform final cleanup operations #*=============================================== You'll need to pop the install files in to the files folder and the key file and change the address's to fit your network. You'll also need the PS APP deploy toolkit Arthur referenced http://Http://psappdeploytoolkit.codeplex.com For what it's worth we moved away from deploying via script as the Solus3 console method works much better for some strange reason, must do other things the script method doesn't. Also the client installed via this method were unstable (offline/online/offline etc) whereas ones installed via the console were solid
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now