Windows Vista Forums

Using objSoftware.Install help

  1. #1


    echosummit Guest

    Using objSoftware.Install help

    Hi all I have a script I am using to install an msi on a remote machine. I
    need it to run the installer, then wait until it finishes before moving on
    the rest of the script which simply edits permissions that the installer
    changes.

    does objSoftware.Install do this or would I have to sleep for x seconds
    until it is done?



    Here is the line in question:

    errReturn = objSoftware.Install("C" & strFile & "\MFEagent.msi",,True)



    Thanks for any advice!

    Also I considered using ShellWait API function as described here

    http://www.wintask.com/onlinehelp/La.../ShellWait.htm

    but I am not sure if that is what I am looking for.

      My System SpecsSystem Spec

  2. #2


    hungerfordj Guest

    Re: Using objSoftware.Install help

    On Apr 21, 2:04*pm, echosummit <echosum...@xxxxxx>
    wrote:

    > Hi all I have a script I am using to install an msi on a remote machine. I
    > need it to run the installer, then wait until it finishes before moving on
    > the rest of the script which simply edits permissions that the installer
    > changes.
    >
    > does objSoftware.Install do this or would I have to sleep for x seconds
    > until it is done?
    >
    > Here is the line in question:
    >
    > errReturn = objSoftware.Install("C" & strFile & "\MFEagent.msi",,True)
    >
    > Thanks for any advice!
    >
    > Also I considered using ShellWait API function as described here
    >
    > http://www.wintask.com/onlinehelp/La.../ShellWait.htm
    >
    > but I am not sure if that is what I am looking for.
    The TRUE statement at the end of your line that installs the software
    indicates that your script will not continue until such time that the
    installation terminates.

    Jim

      My System SpecsSystem Spec

  3. #3


    echosummit Guest

    Re: Using objSoftware.Install help



    "hungerfordj@xxxxxx" wrote:

    > On Apr 21, 2:04 pm, echosummit <echosum...@xxxxxx>
    > wrote:

    > > Hi all I have a script I am using to install an msi on a remote machine. I
    > > need it to run the installer, then wait until it finishes before moving on
    > > the rest of the script which simply edits permissions that the installer
    > > changes.
    > >
    > > does objSoftware.Install do this or would I have to sleep for x seconds
    > > until it is done?
    > >
    > > Here is the line in question:
    > >
    > > errReturn = objSoftware.Install("C" & strFile & "\MFEagent.msi",,True)
    > >
    > > Thanks for any advice!
    > >
    > > Also I considered using ShellWait API function as described here
    > >
    > > http://www.wintask.com/onlinehelp/La.../ShellWait.htm
    > >
    > > but I am not sure if that is what I am looking for.
    >
    > The TRUE statement at the end of your line that installs the software
    > indicates that your script will not continue until such time that the
    > installation terminates.
    >
    > Jim
    >
    Thanks Jim!

    Out of curiosity, did you know that from experience or did it state in an
    API or documentation somewhere?

      My System SpecsSystem Spec

  4. #4


    Kash Guest

    Re: Using objSoftware.Install help

    Hi All, I want to install a software on remote pc by copying .exe file to the
    remote pc & then want to install it on remote pc. i'm bit confused how to do
    that...
    Can someone Help me out..
    Just started playing with VB script and I'm trying the below script.
    Regards,
    Kash


    Option Explicit
    ON Error Resume NEXT
    Dim FSO, wshnetwork, strcomputer, shell, return
    const overwriteexisting = true
    Set FSO = Createobject("Scripting.FileSystemObject")
    Set WSHNetwork = Createobject("Wscript.Network")
    set shell = wscript.createobject("wscript.shell")
    strcomputer = inputbox("Please enter the computername: ")
    fso.copyfile "\\tpsys\tpsoftware$\BatchFile\Softwares\Adobe9.exe", "\\" &
    strcomputer & "\c$\Windows\Temp\", overwriteexisting
    set objsoftware = "\\" & strcomputer & "\c$\Windows\Temp\Adobe9.exe"
    return = objsoftware.install("\\" & strcomputer &
    "\c$\Windows\Temp\Adobe9.exe",,True)

      My System SpecsSystem Spec

  5. #5


    Al Dunbar Guest

    Re: Using objSoftware.Install help



    "Kash" <Kash@newsgroup> wrote in message
    news:314703D9-18D8-4D8F-A39B-6191D6B605B7@newsgroup

    > Hi All, I want to install a software on remote pc by copying .exe file to
    > the
    > remote pc & then want to install it on remote pc. i'm bit confused how to
    > do
    > that...
    > Can someone Help me out..
    > Just started playing with VB script and I'm trying the below script.
    > Regards,
    > Kash
    >
    >
    > Option Explicit
    > ON Error Resume NEXT
    > Dim FSO, wshnetwork, strcomputer, shell, return
    > const overwriteexisting = true
    > Set FSO = Createobject("Scripting.FileSystemObject")
    > Set WSHNetwork = Createobject("Wscript.Network")
    > set shell = wscript.createobject("wscript.shell")
    > strcomputer = inputbox("Please enter the computername: ")
    > fso.copyfile "\\tpsys\tpsoftware$\BatchFile\Softwares\Adobe9.exe", "\\" &
    > strcomputer & "\c$\Windows\Temp\", overwriteexisting
    > set objsoftware = "\\" & strcomputer & "\c$\Windows\Temp\Adobe9.exe"
    > return = objsoftware.install("\\" & strcomputer &
    > "\c$\Windows\Temp\Adobe9.exe",,True)
    I am not familiar with any COM object having a .install method, however, the
    last set command above seems likely to fail. The set command assigns an
    object value to a variable, however, you have attempted to assign a string
    value.

    The most common usage of the set command is to assign the variable a value
    supplied by the CreateObject or GetObject functions, each of which accepts
    the "ProgID" of an installed COM object, for example
    "scripting.filesystemobject", "Excel.Application", "ADSystemInfo". If the
    COM object you are wanting to use has a known ProgID, you might be able to
    instantiate it on the remote system with something like:

    set objsoftware = createobject("whatever.ProgID", strComputer )

    Alternately, COM objects can be defined by giving a path to them instead of
    their registered ProgID. Unfortunately, I am pretty rusty on this stuff at
    present...

    /Al



      My System SpecsSystem Spec

Using objSoftware.Install help

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Vista Home Premium Install Hangs At Completing. (Clean Install) DeHart Vista installation & setup 1 05 May 2010
Vista SP2 will not Install(error 0x80070002),In Place Upgrade Repair Install urlnts General Discussion 4 16 Jun 2009
RE: Remote control applet wont install or even prompt to install-vista Golden Eagle Virtual Server 1 14 Nov 2008
Can't Install Vista Home premium upgrade - "can't install a file and quits vincen11@msu.edu Vista installation & setup 3 20 Feb 2007
Promise FastTrak S150 TXplus Install Vista B2 install success!(do Zhu Xuan Vista General 0 26 Jun 2006