From e11b310efd59d1e49ee4d2b9e5c572a9a98a656d Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 8 Feb 2013 21:21:37 +0000 Subject: [PATCH] Fix windows.pm to be drive letter agnostic in installs Fix fixupunattend.vbs to not echo git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15124 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/windows.pm | 11 ++++++----- .../share/xcat/netboot/windows/fixupunattend.vbs | 2 -- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/windows.pm b/xCAT-server/lib/xcat/plugins/windows.pm index 88a6e0ddb..e64d8bdc0 100644 --- a/xCAT-server/lib/xcat/plugins/windows.pm +++ b/xCAT-server/lib/xcat/plugins/windows.pm @@ -424,13 +424,14 @@ sub mkinstall copy("$::XCATROOT/share/xcat/netboot/detectefi.exe","$installroot/utils/detectefi.exe"); } open($shandle,">","$installroot/autoinst/$node.cmd"); - print $shandle "i:\\utils\\windows\\fixupunattend.vbs $node.xml x:\\unattend.xml\r\n"; + print $shandle 'for /f "tokens=2 delims= " %%i in ('."'net use ^| find ".'"install"'."') do set instdrv=%%i\r\n"; + print $shandle "%instdrv%\\utils\\windows\\fixupunattend.vbs %instdrv%\\autoinst\\$node.xml x:\\unattend.xml\r\n"; if ($sspeed) { $sport++; - print $shandle "i:\\$os\\$arch\\setup /unattend:x:\\unattend.xml /emsport:COM$sport /emsbaudrate:$sspeed /noreboot\r\n"; + print $shandle "%instdrv%\\$os\\$arch\\setup /unattend:x:\\unattend.xml /emsport:COM$sport /emsbaudrate:$sspeed /noreboot\r\n"; } else { - print $shandle "i:\\$os\\$arch\\setup /unattend:x:\\unattend.xml /noreboot\r\n"; + print $shandle "%instdrv%\\$os\\$arch\\setup /unattend:x:\\unattend.xml /noreboot\r\n"; } #print $shandle "i:\\postscripts\ print $shandle 'reg load HKLM\csystem c:\windows\system32\config\system'."\r\n"; #copy installer DUID to system before boot @@ -441,10 +442,10 @@ sub mkinstall print $shandle "IF %PROCESSOR_ARCHITECTURE%==x64 GOTO x64\r\n"; print $shandle "IF %PROCESSOR_ARCHITECTURE%==x86 GOTO x86\r\n"; print $shandle ":x86\r\n"; - print $shandle "i:\\postscripts\\upflagx86 %XCATD% 3002 next\r\n"; + print $shandle "%instdrv%\\postscripts\\upflagx86 %XCATD% 3002 next\r\n"; print $shandle "GOTO END\r\n"; print $shandle ":x64\r\n"; - print $shandle "i:\\postscripts\\upflagx64 %XCATD% 3002 next\r\n"; + print $shandle "%instdrv%\\postscripts\\upflagx64 %XCATD% 3002 next\r\n"; print $shandle ":END\r\n"; close($shandle); if ($vpdhash->{$node}) { diff --git a/xCAT-server/share/xcat/netboot/windows/fixupunattend.vbs b/xCAT-server/share/xcat/netboot/windows/fixupunattend.vbs index e9c3541c0..81381ca4e 100644 --- a/xCAT-server/share/xcat/netboot/windows/fixupunattend.vbs +++ b/xCAT-server/share/xcat/netboot/windows/fixupunattend.vbs @@ -19,9 +19,7 @@ dim notefi notefi=1 if filesys.FileExists(drvletter&"\utils\windows\detectefi.exe") then notefi = myshell.run(drvletter&"\utils\windows\detectefi.exe",1,true) - WScript.Echo(notefi) end if -WScript.Echo(notefi) srcfilename = WScript.Arguments.Item(0) dstfilename = WScript.Arguments.Item(1) Set srcfile = filesys.OpenTextFile(srcfilename,1)