This project is read-only.

Excute Process for MSI

Topics: Archive - General
Jan 3, 2014 at 1:45 PM
Hello,

This is another issue I have installing an application which has a MSP and needs to copy files and run a bat file.

The error message is "The term x86" is not recognized. I guess a quote issue again.

Thanks,
Edy

Perform installation tasks here

Execute-Process -FilePath "msiexec.exe" -Arguments "/i $DirFiles\Elite Enterprise 3.6.msi /q NETWORK_INIFILE=\\SERVERNAME\elite\eis.ini"
Execute-MSI -ACTION Patch -Path "eesp6_003.msp" -PARAMETERS "REINSTALL=ALL REINSTALLMODE=omus /qn"
Copy-File -Path "$dirSupportFiles\*.*" -Destination "$envProgramFiles(x86)\Elite Information Systems\Enterprise"
Execute-Process -FilePath "$dirFiles\RegitWin7.bat" -WindowStyle Hidden
Copy-File -Path "$dirSupportFiles\Elite Enterpris.lnk" - Destination "C:\Documents and Settings\All Users\Desktop\Elite Enterprise.lnk
Coordinator
Jan 3, 2014 at 5:18 PM
Just to note, Copy-File only works on individual files, so it needs to be wrapped. This should do the trick for you:
    # Install MSI & Patch
    Execute-MSI -Action Install -Path "Elite Enterprise 3.6.msi" -Parameters "NETWORK_INIFILE=\\SERVERNAME\elite\eis.ini Reboot=ReallySuppress /QB!"
    Execute-MSI -Action Patch -Path "eesp6_003.msp" -Parameters "REINSTALL=ALL REINSTALLMODE=omus /QB!"

    # Copy each file in the Files folder
    ForEach ($file in (Get-ChildItem $dirSupportFiles)) {
        Copy-File -Path ($file.FullName) -Destination "$envProgramFilesX86\Elite Information Systems\Enterprise\($file.Name)"
    }

    # Run batch file
    Execute-Process -FilePath "$dirFiles\RegitWin7.bat" -WindowStyle Hidden

    # Copy link (I would use Create-Shortcut instead)
    Copy-File -Path "$dirSupportFiles\Elite Enterprise.lnk" -Destination "C:\Documents and Settings\All Users\Desktop\Elite Enterprise.lnk"
Regards, Dan
Jan 3, 2014 at 8:17 PM
Thanks Dan,

This ran fine. However each time when I start the application I get this error

"Error opening installation log file. Verify that the specified log file exists and is writable". I just click okay and the application open fine. It seems to be installed fine.

Any idea why I receive this error about a log file?

I specified a /Q switch in my first post before NETWORK File. Which seems to be missing in your reply.

Thanks,
Edy
Coordinator
Jan 3, 2014 at 8:20 PM
This is when opening the actual application, not running the installation? Afraid I'm not sure :(