Windows Vista Forums

Re: HowTo: Install missing hardware drivers using powershell scrip

  1. #1


    Joel Bennett Guest

    Re: HowTo: Install missing hardware drivers using powershell scrip

    just run them, for instance, the following 3-line script will work fine:

    Write-Host "Hello World"
    C:\Windows\System32\cmd.exe /c echo %computername%
    C:\Users\You\Downloads\SomeInstaller.msi

    .... will work fine ...
    --
    Joel


    mobcdi wrote:

    > Maybe if i asked a more direct question to start.
    >
    > How would I get a powershell script to run .exe and .msi programs?
    >
    >

      My System SpecsSystem Spec

  2. #2


    CommandBreak Guest

    Re: HowTo: Install missing hardware drivers using powershell scrip

    you can get a list of devices that are in an errored state using the
    following one-liner

    Get-WmiObject Win32_PNPEntity | Where-Object{$_.ConfigManagerErrorcode -ne 0}

    the ConfigManagerErrorcode property is the one you are interested in, and
    there are many different values, check out
    http://msdn.microsoft.com/en-us/libr...53(VS.85).aspx for more info.

    as you are new to scripting, i suggest you try and approach this problem the
    following way:

    1. create a catalogue of DeviceID for all types of hardware you care about.
    2. put an action against each of these id's, installing an application as
    suggested by Joel.
    3. run your script against a test target, review the results.

    === stretch goals
    4. to make it extensible you might want to think about reporting on dev id's
    that aren't in your catalogue already
    5. wmi works remotely so you can run this from a central pc/server and
    collect the results

    happy scripting

    "Joel Bennett" wrote:

    > just run them, for instance, the following 3-line script will work fine:
    >
    > Write-Host "Hello World"
    > C:\Windows\System32\cmd.exe /c echo %computername%
    > C:\Users\You\Downloads\SomeInstaller.msi
    >
    > .... will work fine ...
    > --
    > Joel
    >
    >
    > mobcdi wrote:

    > > Maybe if i asked a more direct question to start.
    > >
    > > How would I get a powershell script to run .exe and .msi programs?
    > >
    > >
    >

      My System SpecsSystem Spec

Re: HowTo: Install missing hardware drivers using powershell scrip

Similar Threads
Thread Forum
Re: HOWTO Use Vista Event Log to diagnose hardware problem?
"John Wong" <thjwong@xxxxxx> wrote in message news:b4720dce-09e8-4393-8edf-d7338545a7ef@xxxxxx Vista is a NT based O/S and you can enable its...
Vista General
Hi there I am trying to write a powershell scrip so I can connect tomy mssql servers via osql
However, I do not want to type all off the sqlserver instance I would like to grep from a file say part of the instance name and I would like it to...
PowerShell
why Vista wont let you install any drivers for your hardware
i have recently built my own desk top system for scratch and have intsalled windows vista on it but when i came to installing my motherbroad...
Vista General
Hardware still missing drivers support...
Granted Vista has more hardware support than XP at launch...... The hardware being supported are mostly legacy stuff and the newer stuffs are not...
Vista hardware & devices
RE: Howto: Use a com object in Powershell
did you try $vol.psobject | gm or .psbase? "allanhh" wrote: > I am trying to use a com object instance of the Novell volume administration >...
PowerShell
HowTo: Add an ActiveX control in PowerShell
Goal: I want to be able to add ActiveX control in Powershell. Specifically Remote Desktop Control. I am thinking of creating a windows form with...
PowerShell
after install is completed get device or hardware missing error
hi all need some help vista. i download it and install it. when the installation completed the system restartup. vista loading come up "...
Vista installation & setup