Friday, April 20, 2012 4:52 PM
I am using MDT 2010 just to install applications (No OS) on to Win 7 boxes. The vbs & ZTI wsf scripts work great when called a from a task sequence. If the script is call as an Application Quite Install Command. The scripts still work except that a cscript.exe black command line window pops. is there a way to prevent these windows from popping up? I’ve tried this with the simples possible code (ie there is not much code to share)
The reason for this approach is after the installation of some of the .MSI installers, minor customizing is need for my organization: registry entries and copy/delete files. I would prefer to keep the call to the MSI command and the customizing code together in the same script. The only work around that I can think of, is to install an application and then later as a task sequence call a script to customize an application that may or may not have been selected for installation.
Friday, April 20, 2012 5:48 PMCan you post your command lines here? I can take a look.
Friday, April 20, 2012 6:38 PM
We wrap our msi's in a vbscript wrapper, so we can do file and registry manipulation, and error checking before during and after the install. It also allows us to have one install script and branch off based on XP or Win 7, then on x86 or x64 architecture.
(Partial script, this is missing a lot)
Select Case Build
Case 2600 'Windows XP
(xp install routine here)
Case 7600, 7601, 7602, 7603 'Windows 7
Select Case ArchitectureType
LogFile.Write "Installing " & AppName & " on Windows 7 32-bit..."
Return = WshShell.Run("msiexec /i " & Chr(34) & ScriptPath & "32\LESClient.msi" & Chr(34) & " TRANSFORMS=" & Chr(34) & ScriptPath & "32\LESClient.mst" & Chr(34) & " REBOOT=R REBOOTPROMPT=S /qn", 1, True)
LogFile.WriteLine "Setup returned: " & Return & vbCrLf
'Configure Windows Firewall service
WshShell.Run Chr(34) & ScriptPath & "firewalldisable.bat" & Chr(34), 0, True
WshShell.Run "regedit /s " & Chr(34) & ScriptPath & "32\SXS-Server-Value.reg" & Chr(34), 0, True
LogFile.WriteLine "Script Ended: " & Now
LogFile.Write "Script Execution Complete!"
Friday, May 04, 2012 9:08 PM
Sorry about the delay.
Below is a stripped done .wsf that I setup to reproduce the problem. The test msi is Microsoft SQL Server Compact 3.5 found here: http://www.microsoft.com/en-us/download/details.aspx?id=5783
When called from a task sequnce "cscript %SCRIPTROOT%\Install-SQLCE.vbs" the program installs normally with out a popup.
When called as a standard application the same code installs but the black command line window pops up. I get the same pop up when calling other applications.
<script language="VBScript" src="ZTIUtility.vbs"/>
On Error Resume Next
iRetVal = ZTIProcess
On Error Goto 0
iRetVal = oShell.Run("msiexec.exe /i ""C:\DeploymentShare\msSqlCE\Applications\MS SQL CE SP2\SSCERuntime-ENU.msi"" /q AGREETOLICENSE=""yes"" /l C:\work\mssqlce-log.txt", 0, True)
Monday, May 07, 2012 4:32 PM
I don't understand the problem, is the window staying open? Is the install not running, or not completinG?
Are you attempting to use the WSF command line as the application install? I've not tried that.
Wednesday, May 09, 2012 6:32 PMThe issue is cosmetic. Command windows pop up during the installation when the WSF is called as the application. The windows do close after the WSF is done running. Other than the command window poping up during execution, the WSF runs correctly. I hope that answers your question Joe.