+ Post New Thread
Results 1 to 4 of 4
Windows Thread, msiexec with jscript in Technical; Morning all, We're trying to install Solus3 using Capita's scripts which we can get by exporting the install files from ...
  1. #1

    Join Date
    May 2007
    Location
    London
    Posts
    217
    Thank Post
    6
    Thanked 13 Times in 11 Posts
    Rep Power
    17

    msiexec with jscript

    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

    Code:
    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);
    }

  2. #2

    Join Date
    Apr 2012
    Posts
    1
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hi there

    Am looking into the same thing, did you ever get this working silently ?

  3. #3
    markwilfan's Avatar
    Join Date
    Feb 2009
    Posts
    164
    Thank Post
    32
    Thanked 20 Times in 16 Posts
    Rep Power
    14
    Not sure you solved this but here is my twopeneth worth

    Code:
    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
    Last edited by markwilfan; Yesterday at 09:43 AM.

  4. #4


    Join Date
    Feb 2007
    Location
    51.405546, -0.510212
    Posts
    8,750
    Thank Post
    221
    Thanked 2,626 Times in 1,936 Posts
    Rep Power
    778
    Quote Originally Posted by markwilfan View Post
    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!

SHARE:
+ Post New Thread

Similar Threads

  1. Old hardware - what do you do with it?
    By tarquel in forum Hardware
    Replies: 24
    Last Post: 11th November 2005, 02:35 PM
  2. Intermitent problems with logging on
    By alexknight in forum Wireless Networks
    Replies: 27
    Last Post: 22nd August 2005, 04:01 AM
  3. Problems with Google Earth
    By Dos_Box in forum Educational Software
    Replies: 8
    Last Post: 19th August 2005, 02:32 PM
  4. Fun with EFS
    By RobC in forum Windows
    Replies: 6
    Last Post: 18th August 2005, 11:44 AM
  5. Database with a Barcode Reader
    By mrtechsystems in forum General Chat
    Replies: 5
    Last Post: 28th June 2005, 09:01 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •