From 5562af57515faf78b7409c07ac1f2dd276347c3e Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 17 May 2013 14:28:40 +0000 Subject: [PATCH] Provide hook for OS volume selection git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16353 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/netboot/windows/fixupunattend.vbs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/windows/fixupunattend.vbs b/xCAT-server/share/xcat/netboot/windows/fixupunattend.vbs index 81381ca4e..6ebcfc105 100644 --- a/xCAT-server/share/xcat/netboot/windows/fixupunattend.vbs +++ b/xCAT-server/share/xcat/netboot/windows/fixupunattend.vbs @@ -1,5 +1,5 @@ Dim filesys, srcfile, srcfilename, fline, dstfilename, dstfile, myshell, netuse -Dim tmpstr, elems +Dim tmpstr, elems, instdrv Set myshell = WScript.createObject("WScript.Shell") Set netuse = myshell.Exec("net use") Dim drvletter @@ -13,6 +13,10 @@ Do While Not netuse.StdOut.AtEndOfStream drvletter=elems(1) End If Loop +instdrv = myshell.ExpandEnvironmentStrings ( "%INSTALLTO%" ) +if InStr(instdrv,"%INSTALLTO%") Then + instdrv = "0" +End If Set filesys = CreateObject("Scripting.FileSystemObject") dim notefi @@ -34,6 +38,6 @@ Do Until srcfile.AtEndOfStream fline = Replace(fline,"==BOOTPARTITIONS==","1Primarytrue") fline = Replace(fline,"==INSTALLTOPART==","1") end if - fline = Replace(fline,"==INSTALLTODISK==","0") + fline = Replace(fline,"==INSTALLTODISK==",instdrv) dstfile.WriteLine(Replace(fline,"==INSTALLSHARE==",drvletter)) Loop