[Libosinfo] [PATCHv2 1/4] installer, windows: Use '/c' option of cmd.exe

Daniel P. Berrange berrange at redhat.com
Fri Mar 1 14:17:45 UTC 2013


On Thu, Feb 28, 2013 at 02:18:52AM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)" <zeeshanak at gnome.org>
> 
> Use '/c' option of cmd.exe instead of '/k' as that apparently keeps the
> process running (at least on windows7) and any commands after the loop
> never gets executed.
> 
> TBH I'm a bit confused about '/c' vs '/k' option and the docs don't
> help: http://technet.microsoft.com/en-us/library/bb490880.aspx#EBAA
> 
> What I know for certain is that without this change, Windows 7 installer
> just hangs with an empty cmd.exe window open forever at the end of
> installation. Also I have tested that this change doesn't break this
> script for Windows XP.
> ---
>  data/install-scripts/windows-cmd.xml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/data/install-scripts/windows-cmd.xml b/data/install-scripts/windows-cmd.xml
> index b3121dc..7a56846 100644
> --- a/data/install-scripts/windows-cmd.xml
> +++ b/data/install-scripts/windows-cmd.xml
> @@ -69,7 +69,7 @@ if not "<xsl:value-of select="config/avatar-location"/>"=="" copy "<xsl:value-of
>  REGEDIT /S <xsl:call-template name="script-disk"/>:\windows.reg
>  <xsl:call-template name="post-install-drivers-disk"/>:
>  reg add "HKCU\Software\Policies\Microsoft\Windows NT\Driver Signing" /v BehaviorOnFailedVerify /t reg_dword /d 00000000 /f
> -for %%i in ("<xsl:call-template name="post-install-drivers-disk"/>:<xsl:value-of select="config/post-install-drivers-location"/>\*.cmd") do cmd /k %%i
> +for %%i in ("<xsl:call-template name="post-install-drivers-disk"/>:<xsl:value-of select="config/post-install-drivers-location"/>\*.cmd") do cmd /c %%i
>  reg add "HKCU\Software\Policies\Microsoft\Windows NT\Driver Signing" /v BehaviorOnFailedVerify /t reg_dword /d 00000001 /f
>  EXIT
>  	</xsl:template>

ACK

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the Libosinfo mailing list