+ Post New Thread
Results 1 to 3 of 3
Scripts Thread, grab the result code from a MSI install within a vbscript in Coding and Web Development; hi i use this script to install my software Option Explicit Dim strComputer, objNetwork, wshshell Dim PCname Set objNetwork = ...
  1. #1

    Join Date
    Feb 2011
    Posts
    37
    Thank Post
    2
    Thanked 1 Time in 1 Post
    Rep Power
    0

    grab the result code from a MSI install within a vbscript

    hi

    i use this script to install my software

    Option Explicit
    Dim strComputer, objNetwork, wshshell
    Dim PCname

    Set objNetwork = WScript.CreateObject("WScript.Network")
    PCname = objNetwork.ComputerName

    Set WshShell = WScript.CreateObject("WScript.Shell")

    WshShell.Run "msiexec /i \\server\packages$\eset_client\esetclientwithconfi gv2.msi /quiet /log \\server\packageinstalllogs$\" & PCname & "\eset_client.txt",0,True

    WScript.Quit

    using the /log switch built in to the msiexec i can get a log file telling me if it has worked or not but what i want to do is grab result code and echo the result any ideas how to do this

    thank you

  2. #2

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,689
    Thank Post
    334
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    If all you want to do is echo the entire file output (rather than narrowing/searching)

    Code:
    Set objReadFile = objFSO.OpenTextFile("pathtofileblahblah", 1)
        strContents = objReadFile.ReadAll
        Wscript.Echo strContents
        objReadFile.Close
    Or do you mean you want to bypass the file entirely?

    Steve

  3. #3

    Join Date
    Feb 2011
    Posts
    37
    Thank Post
    2
    Thanked 1 Time in 1 Post
    Rep Power
    0
    hey

    thank you but i have found what i cam looking for from

    Windows System Error Codes (exit codes) Description | Symantec Connect Community

    Dim oShell, MyApp, i
    Set oShell = CreateObject("WScript.Shell")

    MyApp = "msiexec /i \\server\software\mysql-5.5.15-winx64.msi /quiet /log \\server\software\mysql-5.5.15-winx64.txt"

    i = 0
    i = oShell.Run(MyApp, 1 ,True)
    WScript.Echo "Exit Code is: " & (i)
    Set oShell = Nothing

SHARE:
+ Post New Thread

Similar Threads

  1. Promethean Resources cd + MSI Install
    By tosca925 in forum Educational Software
    Replies: 45
    Last Post: 20th April 2007, 11:28 AM
  2. Replies: 3
    Last Post: 4th October 2006, 12:39 AM
  3. How can i Disable the CD Drive from opening?
    By eastlondon in forum Windows
    Replies: 14
    Last Post: 11th July 2006, 10:50 PM
  4. MSI Install of Smartboard software.............found this.!
    By tosca925 in forum How do you do....it?
    Replies: 6
    Last Post: 22nd January 2006, 11:12 PM
  5. location of msi install gpo
    By russdev in forum Windows
    Replies: 3
    Last Post: 17th October 2005, 08:23 AM

Thread Information

Users Browsing this Thread

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

Posting Permissions

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