none
scripting to install executable drivers RRS feed

  • Question

  • I have a script working fine with msi but it doesn't work with exe installer. Need professional advise and  help 

    The first part of script create a folder and unzip the zipped folder which contain setup.exe

    But the rest part of script running 3 installers didn't work , just hanging. If I manually run each installer at PS console, it is ok but I want them to run in sequence , silently and remotely with GPO that has already enabled PSRemoting. GPO also set up to  load the files (unzipped)in local C:\test folder:

    # install msi and exe Installer
    $installer = 'c:\test'
    $exe = @('$installer\dellDriver\dellver1.02\setup','$installer\dellDriver\firmDriver_Win7_64Bit')
    $msi = @('$installed\Installer_Win7')
      
      #foreach ($exefile in $exe) 

    {
    start-process -FilePath "c:\test\dellDriver\dellver1.02\\Setup.exe" /s
    Start-Process -FilePath "c:\test\dellDriver\firmDriver_Win7_64Bit.exe" /s
    Start-Sleep 120
    Start-Process -FilePath "c:\test\Installer_Win7.msi" -ArgumentList "/qn" -wait
    }

    Friday, June 13, 2014 9:24 PM

Answers

  • Why do you need start-process? Just run the commands.


    C:\test\delldriver\dellver1.02\setup.exe /s
    C:\test\delldriver\firmdriver_win7_64bit.exe /s
    msiexec /i C:\test\Installer_Win7.msi /qn
    


    -- Bill Stewart [Bill_Stewart]


    Saturday, June 14, 2014 3:45 AM
    Moderator

All replies

  • Why do you need start-process? Just run the commands.


    C:\test\delldriver\dellver1.02\setup.exe /s
    C:\test\delldriver\firmdriver_win7_64bit.exe /s
    msiexec /i C:\test\Installer_Win7.msi /qn
    


    -- Bill Stewart [Bill_Stewart]


    Friday, June 13, 2014 9:35 PM
    Moderator
  • Also try:

    start-process -FilePath "c:\test\dellDriver\dellver1.02\\Setup.exe" -arg '/s' -wait

    Some installers cannot be run this way.  In that case you have to contact Dell to find out if they have an installer that will work like this. 


    ¯\_(ツ)_/¯

    Friday, June 13, 2014 9:44 PM
  • We need to push out to 200 terminals so cannot just run manually.

    We have powershell script to unzip files and create a folders. Can I run command mixed with powershell?

    The installer vendor said, you can run in DOS by setup.exe /s, which works fine.

    I used this one: but it no error on the console and didn't install neither.

    start-process -FilePath "c:\test\dellDriver\dellver1.02\\Setup.exe" -ArgumentList "/qn" -wait
    Start-Process -FilePath "c:\test\dellDriver\firmDriver_Win7_64Bit.exe" -ArgumentList "/qn" -wait
    Start-Sleep 120
    Start-Process -FilePath "c:\test\Installer_Win7.msi" -ArgumentList "/qn" -wait
    }

    I will try this one:

    start-process -FilePath "c:\test\dellDriver\dellver1.02\\Setup.exe" -arg '/s' -wait

    Friday, June 13, 2014 11:11 PM
  • Then put it in a batch file and run it as suggested by the vendor.

    Why is this a problem?


    ¯\_(ツ)_/¯

    Friday, June 13, 2014 11:22 PM
  • We cannot run two scripts, we pilot everything into one script:

    check Dot and installDot

    create a folder and upzip driver files into a folder.

    I just want to confirm it is the vendor issue or my powershell skill cannot achieve this.

    So I reached out to the community.the below didn't work , it works when run at PS console but not work with 3 start-process cmdlet....

    start-process -FilePath "c:\test\dellDriver\dellver1.02\\Setup.exe" -arg '/s' -wait

    Saturday, June 14, 2014 3:35 AM
  • Why do you need start-process? Just run the commands.


    C:\test\delldriver\dellver1.02\setup.exe /s
    C:\test\delldriver\firmdriver_win7_64bit.exe /s
    msiexec /i C:\test\Installer_Win7.msi /qn
    


    -- Bill Stewart [Bill_Stewart]


    Saturday, June 14, 2014 3:45 AM
    Moderator
  • I want to automate these three executable in one powershell script along with unzip and chec DoNet together in one powershell script.

    Can I run these DOS command in powershell? I did test, I cannot run these in powershell, it must run with start-process.

    C:\test\delldriver\dellver1.02\setup.exe /s
    C:\test\delldriver\firmdriver_win7_64bit.exe /s
    msiexec /i C:\test\Installer_Win7.msi" /qn



    • Edited by Tim8990 Sunday, June 15, 2014 2:58 AM
    Sunday, June 15, 2014 2:37 AM
  • they are not DOS commands.  They are programs that install other programs and drivers.  You can run them at any prompt or put them in a batch file or PS1 file and they will run.


    ¯\_(ツ)_/¯

    Sunday, June 15, 2014 2:43 AM
  • I did test, I cannot run these in powershell, it must run with start-process.

    How do you know that? You don't tell the result of your test. I can't test because I don't have your executables.

    I do know that you don't need start-process to run an executable in PowerShell.

    Also this has nothing to do with DOS.


    -- Bill Stewart [Bill_Stewart]


    Sunday, June 15, 2014 2:55 PM
    Moderator
  • I tried a few days, it just won't work.. Here it is the script:

    I really need help. I tried a few days but just didn't work. I am not that good at powershell. We need to put in one script: (all are working unzip and move-item except the script won't install other two installers..)

    step1 unzip the installer folder 

    step2 move the folder up one level(since it is created a subfolder after unzip)

    step3 install 3 files --two .exe and one msi

    __________________

    #Create a Epson folder first then Unzip EPSON1.02 folder
    $Epson = "c:\test"
     New-Item -Path "$Epson"-Name "Epson" -ItemType "directory"
    $Source = 'c:\test\Epson1.02.zip'
    $Destination = 'c:\test\Epson'                 
    $helper = New-Object -ComObject Shell.Application
    $files = $helper.NameSpace($Source).Items()
    $helper.NameSpace($Destination).CopyHere($files)

    #move Epson1.02 
     Move-Item -path C:\test\Epson\Epson1.02\64Bit\TMS9000DRV102\Setup -destination c:\test

    # driver installer

    $exe = @('c:\test\setup\setup.exe','c:\test\PDS_102_S9000.exe.exe')
    $msi = @('c:\test\Service.Installer_Win7.msi')
      
      foreach ($exefile in $exe) 
    {
     start-process -FilePath "c:\test\setup\setup.exe" /s  # only this one working
     start-process -FilePath "c:\test\PDS_102_S9000.exe" -ArgumentList "/qn" -Wait
     Start-Process -FilePath "c:\test\Service.Installer_Win7.msi" -ArgumentList "/qn" -Wait 
    }

    Tuesday, June 17, 2014 11:45 PM
  • You keep changing the question.  You fail to understand that what you are trying to do cannot be done.  You must contact the vendor of the programs to get instructions. 

    This is not a scripting issue.  Sorry.

    If the vendor did not design the installer to do what you want then it cannot be done.


    ¯\_(ツ)_/¯

    Tuesday, June 17, 2014 11:48 PM
  • Of course, I needed to change the questions when  I was told to change or modify the scripts.

    I will try Bill's suggestion anyway.

    Wednesday, June 18, 2014 2:45 AM