Problem with Execute-File and Arguments

Topics: Archive - General
Jul 24, 2014 at 11:25 AM
Edited Jul 24, 2014 at 11:35 AM
Hi there,

i would like to deploy the CM12 Console with following line:

Execute-Process -FilePath "ConsoleSetup.exe" -Arguments "/q TARGETDIR=$envProgramfiles\CM12\Adminconsole LangPackDir=C:\Downloads\ConfgMgrConsole EnableSQM=0 DefaultSiteSeverName=sccmserver.mydomain.com"

As error comes return:
[24-07-2014 12:22:03] [Installation] Cannot process argument transformation on parameter 'WindowStyle'. Cannot convert value "TARGETDIR=C:\Program Files\CM12\Adminconsole" to type "System.Diagnostics.ProcessWindowStyle". Error: "Unable to match the identifier name TARGETDIR=C:\Program Files\CM12\Adminconsole to a valid enumerator name. Specify one of the following enumerator names and try again: Normal, Hidden, Minimized, Maximized" (at <ScriptBlock>, E:#Package\Microsoft_CM12-Console-R2_5.0.7958.1203_x86\Deploy-Application.ps1: line 95)

Can anyone help me? What is wrong on this "" ???
Thx.
Coordinator
Jul 24, 2014 at 11:32 AM
Hey,

Can you try with the following change?
Execute-Process -FilePath "ConsoleSetup.exe" -Arguments "/q TARGETDIR='"$envProgramfiles\CM12\Adminconsole'" LangPackDir=C:\Downloads\ConfgMgrConsole EnableSQM=0 DefaultSiteSeverName=sccmserver.mydomain.com"
Cheers, Dan
Jul 24, 2014 at 11:43 AM
Edited Jul 24, 2014 at 11:45 AM
Hi Sintaxasn,

i try this out but the script will not be able to startup, if i click deploy-application.exe nothings happen.
there is no logfile to view why doesn´t he start. :( strange

the logfile from CONSOLESETUP writes the there is an invalid argument with FILES\CM12\ADMINCONSOLE. The installer has problem with the blanks in foldername.

greetz, aaj
Coordinator
Jul 24, 2014 at 11:44 AM
Can you run using PowerShell directly? It should indicate there's a problem with a line in the script
Jul 24, 2014 at 12:02 PM
Yes, here the error
[24-07-2014 13:56:59] [Installation] Cannot process argument transformation on parameter 'WindowStyle'. Cannot convert value "C:\Program Files (x86)\CM12\Adminconsole EnableSQM=0 DefaultSiteServerName=w1vswd00.nedc.mgmt.axa-tech.intraxa" to type "System.Diagnostics.ProcessWindowStyle". Error: "Unable to match the identifier name C:\Program Files (x86)\CM12\Adminconsole EnableSQM=0 DefaultSiteServerName=w1vswd00.nedc.mgmt.axa-tech.intraxa to a valid enumerator name. Specify one of the following enumerator names and try again: Normal, Hidden, Minimized, Maximized" (at <ScriptBlock>, E:#Package\Microsoft_CM12-Console-R2_5.0.7958.1203_x86\Deploy-Application.ps1: line 95)

and with ' the powershell stops directly.
Coordinator
Jul 24, 2014 at 12:05 PM
Hmmm, doesn't seem to like the variable. Here's the line I use which works perfectly:
Execute-Process -FilePath "$dirFiles\consolesetup.exe" -Arguments "/q TargetDir=`"C:\Program Files\ConfigMgr Console`" EnableSQM=1 DefaultSiteServerName=MySCCMServer"
Modify as needed and try again.
Jul 24, 2014 at 2:39 PM
Edited Jul 24, 2014 at 2:40 PM
Thanks, it works.

this symbol ` is a little bit different to ' this.

that was now my fail, thank you. ;)

greetz, aaj