Here's my script I'm using and I'll also show the output later. Nothing is happening exactly.
Write-Host "Installing Office 2010 Professional Plus..." #Installation $mypath = Split-Path $MyInvocation.MyCommand.Path #Bestimmt den Ort des Scripts und geht einen Ordner nach oben (Split-Path), dieser wird dann unter $a gespeichert. $installdir = Join-Path (Split-Path(Split-Path(Split-Path(Split-Path(Split-Path(Split-Path $MyInvocation.MyCommand.Path)))))) "\Installationsfiles" #Hier wird der Überordner für das Installationsfile festgelegt. $config = [xml] (get-content (Join-Path (Split-Path(Split-Path $mypath)) install.xml)) #Liest die Konfigurationsdatei aus (den Inhalt). $u = $env:HOMESHARE #Der Ordner für den lokalen User wird hier definiert. $install = Join-Path $installdir "\Office 2010 Pro Plus\setup.exe" #Speichert den Dateipfad unter $install. If ($config.Installer.GlobalSettings.Installer.pctype -eq "Client") { $adminfile = Join-Path $installdir "\Office 2010 Pro Plus\x86\ProPlusr.WW\config.xml" #Speichert das Adminfile für den späteren Gebrauch. } Else { $adminfile = Join-Path $installdir "\Office 2010 Pro Plus\x64\ProPlusr.WW\config.xml" #Speichert das Adminfile für den späteren Gebrauch. } Write-Host $adminfile $process = (Start-Process -FilePath $install -ArgumentList "/config $adminfile" -Wait -Verb RunAs -PassThru) #Speichert den Process in $process, durch -PassThru können weitere Angaben gemacht werden #If (-not ($process.ExitCode -eq 0)) Write-Host -Fore Red "Errorcode: " $process.ExitCode Start-Process -FilePath $install -ArgumentList "/config $($adminfile)" -Wait -Verb RunAs #Startet die automatische Installation (-ArgumentList), akzeptiert alle Warnungen (-Verb RunAs) und wartet, bis die Installation vorbei ist (-Wait). Damit der Pfad auch als Pfad gelesen wird, muss das Urgument in Double-Quotes und nicht Single-Quotes gesetzt sein. #Configuration Write-Host -Fore Green "Office 2010 Professional Plus..."
Output looks like this:
I can tell you that $install is correct, because I tried different things and got the info from Office about using paramaters like /admin or /adminfile etc.
When using /admin, it tells me that this version of Office doesn't support this parameter.
The following is my signature:
Powershell Programmer & Advanced Lua Programmer
Location: Switzerland
Beside that, whenever you see a reply, you think is helpful, click "Vote As Helpful"! And whenever you see a
reply being an answer to the main question of the thread, click "
Mark As Answer" (if you opened the thread).
I published the URL's for the icons in my signature.
Please contact me, before reporting me, thank you.
[string](0..21|%{[char][int]([int]("{0:d}" -f 0x28)+('577076797174-87661607769657424-8687168065964').substring(($_*2),2))})-replace' '