Provide hook for OS volume selection

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16343 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2013-05-16 21:03:24 +00:00
parent 5c3e7c96e7
commit b21c3d7a61

View File

@ -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==","<CreatePartitions><CreatePartition><Order>1</Order><Type>Primary</Type><Extend>true</Extend></CreatePartition></CreatePartitions>")
fline = Replace(fline,"==INSTALLTOPART==","1")
end if
fline = Replace(fline,"==INSTALLTODISK==","0")
fline = Replace(fline,"==INSTALLTODISK==",instdrv)
dstfile.WriteLine(Replace(fline,"==INSTALLSHARE==",drvletter))
Loop