Jump to content

Recommended Posts

Posted (edited)

Okay folks, not sure if anybody else has done this but I think I have partially cracked it and I haven't seen this solution mention here so I'm sharing.

 

Scenario - Silently install SOLUS 3

 

Searched for solutions high and low. I just wanted to be able to Install it via running the MSI and thats been well documented and never solved. Tried GPO and that hasn't worked. I've been running a Script on the Computers after i've logged in to install it but obviously you always get an Interactive window. Thought i'd try a different approach and see where the MSIEXEC command lived which is in the JS file. Searched for how to modify this for a silent install and bingo!

 

Just add /qb to the MSIEXEC line in the Java Script and it will install without any prompts and with the correct Key file. I've tested on 4 machines its worked. The only thing it does do is close the Command Prompt dialogue box so if you're using this in a task Sequence do a test before Roll Out as you don't want it breaking the sequence. I don't see any reason (if permissions are right) why this couldn't be run from the Login Script now

 

Either way, i hope this helps someone out there with getting this installed.

 

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 [color="#FF0000"]/qb[/color] /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 +
             "\"", 0, true);

function is64() {

var shell = WScript.CreateObject("WScript.Shell");
return (wshShell.Environment("SYSTEM")("PROCESSOR_ARCHITECTURE").indexOf("64") + 1);

Edited by ChrisERoots
  • Thanks 3
Posted

We use the below VBS script, run as a Computer Startup script (it's basically the Javascript code but in VBS):

 

Option Explicit

Dim wshShell, solus3Agent, fso

Set wshShell = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")

solus3Agent = wshShell.ExpandEnvironmentStrings("%ProgramFiles%") & "\Solus3\AgentService\Sims.Solus3.Agent.AgentService.exe"

If fso.FileExists(solus3Agent) Then
  WScript.Quit
End If

Const msiFolder = ""
Const logFileName = "solus3_agent_installer.log"
Const agentAddress = "net.tcp://localhost:52966"
Const dsAddress = "net.tcp://:52965"
Const keyFileName = "Solus3.Keys.DeploymentService.Public.xml"
Const msi32 = "SOLUS3AgentInstaller_x86.msi"
Const msi64 = "SOLUS3AgentInstaller_x64.msi"

If is64 Then
InstallAgent(msi64)
Else
InstallAgent(msi32)
End If


'***********************************************************************************************************************************

Function is64
is64 = InStr("AMD64",WshShell.Environment("System")("PROCESSOR_ARCHITECTURE"))
End Function


Sub InstallAgent(msi)
   Dim typeLib, returnCode
Set typeLib = CreateObject("Scriptlet.TypeLib")

returnCode = wshShell.Run ("msiexec.exe /qb /lv* """ & fso.BuildPath(wshShell.Environment("SYSTEM")("TEMP"), logFileName) _
				& """ /i """ & msiFolder & "\" & msi _
				& """ AGENTSERVICEADDRESS=""" & agentAddress _
				& """ AGENTID=""" & Left(TypeLib.Guid, 38) _
				& """ DEPLOYMENTSERVERADDRESS=""" & dsAddress _
				& """ RSAKEYPATH=""" & msiFolder _
				& """", 0, True)
End Sub

 

I've ripped it from a larger script that also emails the computer name and return code (so I know to add it under 'Targets > Client' in the SOLUS Console) but it should work.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...