Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Remote Install MSI

Reply
 
Old 02-21-2007   #1 (permalink)
Daedalus


 
 

Remote Install MSI

I am looking for a way to remotely install an MSI through a VB script, but
more importantly a PS script. I have tried the VB script in the Windows
Scripting center but I always get an 80070005 "Access Denied" error stating
an issue with SWbemLocator. I have enabled DCOM on the remote computer, but
still no luck.

I am now trying to find a way to do it in a PowerShell script. I looked at
the Windows Scripting Center under PowerShell but there were only examples of
listing installed programs, no installs.

I would think someone has got this to work already.

Thanks

My System SpecsSystem Spec
Old 02-22-2007   #2 (permalink)
jtsm


 
 

RE: Remote Install MSI

How are you trying to do this?

eg.
Computer01 - machine executing the script
Server01 - Share containing the MSI
Computer02 - Machine to recieve the MSI



"Daedalus" wrote:

> I am looking for a way to remotely install an MSI through a VB script, but
> more importantly a PS script. I have tried the VB script in the Windows
> Scripting center but I always get an 80070005 "Access Denied" error stating
> an issue with SWbemLocator. I have enabled DCOM on the remote computer, but
> still no luck.
>
> I am now trying to find a way to do it in a PowerShell script. I looked at
> the Windows Scripting Center under PowerShell but there were only examples of
> listing installed programs, no installs.
>
> I would think someone has got this to work already.
>
> Thanks

My System SpecsSystem Spec
Old 02-22-2007   #3 (permalink)
Blip


 
 

Re: Remote Install MSI

On Wed, 21 Feb 2007 12:54:00 -0800, Daedalus
<Daedalus@discussions.microsoft.com> wrote:

>I am looking for a way to remotely install an MSI through a VB script, but
>more importantly a PS script. I have tried the VB script in the Windows
>Scripting center but I always get an 80070005 "Access Denied" error stating
>an issue with SWbemLocator. I have enabled DCOM on the remote computer, but
>still no luck.
>
>I am now trying to find a way to do it in a PowerShell script. I looked at
>the Windows Scripting Center under PowerShell but there were only examples of
>listing installed programs, no installs.
>
>I would think someone has got this to work already.
>
>Thanks



From page 93 of the user guide...

(Get-WMIObject -ComputerName PC01 -List | Where-Object -FilterScript
{$_.Name -eq
"Win32_Product"}).InvokeMethod("Install","\\AppSrv\dsp\NewPackage.msi")
My System SpecsSystem Spec
Old 02-22-2007   #4 (permalink)
jtsm


 
 

Re: Remote Install MSI

This method typically will not work in most environments. If you are
deploying in an AD evironment you will not be able to invoke a remote
installation unless the machines are trusted for delegation. So will allow
the passing on of credentials. The example supplied in the primer manual
would have to meet this criteria to work. it will break on the third hop, and
reject the access.

Having machines and servers setup trusted for delegation in the real world
can pose a security risk on a network.

"Blip" wrote:

> On Wed, 21 Feb 2007 12:54:00 -0800, Daedalus
> <Daedalus@discussions.microsoft.com> wrote:
>
> >I am looking for a way to remotely install an MSI through a VB script, but
> >more importantly a PS script. I have tried the VB script in the Windows
> >Scripting center but I always get an 80070005 "Access Denied" error stating
> >an issue with SWbemLocator. I have enabled DCOM on the remote computer, but
> >still no luck.
> >
> >I am now trying to find a way to do it in a PowerShell script. I looked at
> >the Windows Scripting Center under PowerShell but there were only examples of
> >listing installed programs, no installs.
> >
> >I would think someone has got this to work already.
> >
> >Thanks

>
>
> From page 93 of the user guide...
>
> (Get-WMIObject -ComputerName PC01 -List | Where-Object -FilterScript
> {$_.Name -eq
> "Win32_Product"}).InvokeMethod("Install","\\AppSrv\dsp\NewPackage.msi")
>

My System SpecsSystem Spec
Old 02-23-2007   #5 (permalink)
$hay


 
 

Re: Remote Install MSI

One way is to use psexec.exe from Windows SysInternals
http://www.microsoft.com/technet/sys...s/default.mspx

interactive
psexec \\computername -u <domain\user> -p <password> -i -d <package_path>

non-interactive
psexec \\computername -u <domain\user> -p <password> -s -i -d <package_path>


Another option is to use WMI Create Method of the Win32_Process Class
http://msdn2.microsoft.com/en-us/library/aa389388.aspx

Check this one too, from the Hey, Scripting Guy!
http://www.microsoft.com/technet/scr...4/hey0901.mspx

--
$hay
http://scriptolog.blogspot.com



"Daedalus" <Daedalus@discussions.microsoft.com> wrote in message
news:21E77F22-2231-4350-AD79-C5A6C393653B@microsoft.com...
>I am looking for a way to remotely install an MSI through a VB script, but
> more importantly a PS script. I have tried the VB script in the Windows
> Scripting center but I always get an 80070005 "Access Denied" error
> stating
> an issue with SWbemLocator. I have enabled DCOM on the remote computer,
> but
> still no luck.
>
> I am now trying to find a way to do it in a PowerShell script. I looked
> at
> the Windows Scripting Center under PowerShell but there were only examples
> of
> listing installed programs, no installs.
>
> I would think someone has got this to work already.
>
> Thanks



My System SpecsSystem Spec
Old 02-23-2007   #6 (permalink)
Marcel J. Ortiz [MSFT]


 
 

Re: Remote Install MSI

Like others have mentioned you should be able to use the Win32_Process or
Win32_Product WMI classes to do this, however, you'll have to troubleshoot
the Access Denied error you are getting first. The problem is most likely
not a language issue so switching from VB to PS won't fix it.
Unfortunately, I'm not much of an expert on WMI so I can't help you ou there
but there are plenty of pages with troubleshooting steps if you search for
"WMI Access Denied".

"Daedalus" <Daedalus@discussions.microsoft.com> wrote in message
news:21E77F22-2231-4350-AD79-C5A6C393653B@microsoft.com...
>I am looking for a way to remotely install an MSI through a VB script, but
> more importantly a PS script. I have tried the VB script in the Windows
> Scripting center but I always get an 80070005 "Access Denied" error
> stating
> an issue with SWbemLocator. I have enabled DCOM on the remote computer,
> but
> still no luck.
>
> I am now trying to find a way to do it in a PowerShell script. I looked
> at
> the Windows Scripting Center under PowerShell but there were only examples
> of
> listing installed programs, no installs.
>
> I would think someone has got this to work already.
>
> Thanks


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
RE: Remote control applet wont install or even prompt to install-vista Virtual Server
Remote Install Blocked Vista security
Windows Vista remote install for Sophos AV Vista networking & sharing
HP IP Console switch (kvm) - remote management doesn't install Vista General
How install a msi package on a remote computer with Powershell? PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46