fdd Opublikowano 24 Września 2011 Autor Zgłoś Udostępnij Opublikowano 24 Września 2011 Jeśli ktoś ciekawy to wystarczy skopiować na pena pliki instalatora Windows 8 ( koniecznie 32 bit) i mamy kolejny system instalacyjny na penie. Jeśli ktoś chce wersje 64 bit to trzeba gdzieś dograć (lub zamienić) sam plik install.wim z wersji 64x. Pliki można skopiować do katalogu wisty (jeśli ktoś nie używa visty) i mamy działające menu (z małą ściemą w nazwie) lub utworzyć nowy katalog dla wersji Windows 8 i poprawić plik menu.htm. I tu pytanie Poniższy poprawiony plik <HEAD> <TITLE>Instalatory</TITLE> <HTA:APPLICATION APPLICATIONNAME="Instalatory" ID="Instalatory" BORDER="dialog" INNERBORDER="no" CAPTION="no" SYSMENU="yes" SCROLL="auto" SINGLEINSTANCE="yes" WINDOWSTATE="maximize" SHOWINTASKBAR="no" CONTEXTMENU="no" NAVIGABLE="yes" SELECTION="no"/> <script language="vbscript" type="text/vbscript"> window.resizeTo 800,600 window.focus </script> <style type="text/css"> body {background-image:url('img\winpe.jpg'); background-repeat:no-repeat; background-attachment:fixed; background-position:center; margin:0px; width:0%; height:100%; left:0%; top:0%; padding:0px; overflow:hidden; z-index:0; font-family:Arial; font-size:20px; font-weight:bold;} #TextArea {font-family:Albertus Medium; font-size:20pt; font-weight:bold; text-align:center; position:absolute; overflow:hidden; width:100%; height:100%; Left:0%; vertical-align:middle; Top:25%;} #menu {border-style:none; position:absolute; overflow:auto; top:5%; height:90%; width:90%; left:5%; right:5%; z-index:2;} p {position:relative; text-align:center; z-index:0;} .button {position:relative; width:325px; font-family:Arial; font-size:12px; font-weight:bold; z-index:2; text-decoration: none; background: #bfb url("img\menu_pionowe_tlo.gif") repeat-x top; color: #254; border-style:ridge; border-left: 1px solid #797;} .button_hover {position:relative; width:325px; font-family:Arial; font-size:12px; font-weight:bold; z-index:2; text-decoration: none; background:url("img\menu_pionowe_tlo2.gif"); color: #bff; background-color: #797; border-style:ridge; padding: 3px;} .button2 {position:relative; width:160px; font-family:Arial; font-size:12px; font-weight:bold; z-index:2; text-decoration: none; background: #bfb url("img\menu_pionowe_tlo.gif") repeat-x top; color: #254; border-style:ridge; border-left: 1px solid #797;} .button2_hover {position:relative; width:160px; font-family:Arial; font-size:12px; font-weight:bold; z-index:2; text-decoration: none; background:url("img\menu_pionowe_tlo2.gif"); color: #bff; background-color: #797; border-style:ridge; padding: 3px;} h2 {position:relative; text-align:center; z-index:0;} </style> </HEAD> <script language="vbscript" type="text/vbscript"> dim system_install, objShell, objWMIService, strDrive, strSystem, objFso, strName dim wim_oembios, wim_massstorage, Wim_name, Wim_index, pliki_oem, plik_unattended, default_key dim strdp, straoems, strunattend, rc_oembios, rc_massstorage, rc_name, rc_index Set objShell = CreateObject("WScript.Shell") Set objFso = CreateObject("Scripting.FileSystemObject") dim arrCommands arrCommands = Split(Instalatory.commandLine, "$") If objShell.Environment("Process").Item("SystemDrive") = "X:" Then objShell.Environment("Process").Item("Temp") = "X:\Windows\Temp" objShell.Environment("Process").Item("Tmp") = "X:\Windows\Temp" If Not objFSO.FolderExists("X:\Windows\System32\config\systemprofile\Desktop") Then objFSO.CreateFolder "X:\Windows\System32\config\systemprofile\Desktop" End If End If Sub Window_onLoad DataArea.InnerHTML = "" TextArea.InnerHTML = "" MENU.InnerHTML = "" MenuSystem End Sub Sub MenuSystem Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") If objFSO.FileExists(arrCommands(1)&"\repozytorium\455asd8.znk") Then Set folder = objfso.GetFolder(arrCommands(1)&"\repozytorium\systemy") Set files = folder.Files For each folderIdx In files Set objFile = objFSO.OpenTextFile(arrCommands(1)&"\repozytorium\systemy\"& folderIdx.Name,1) strName = split(objFile.ReadAll,vbcrlf) strinstalki_repo_conf = strinstalki_repo_conf & "<input class='button' type='button' onmouseover='MouseOver' onmouseout='MouseOut' value='Zainstaluj "&strName(1)&"' onClick='Install_repo_conf ""&strName(1)&"",""&strName(3)&"",""&strName(5)&"",""&strName(7)&"",""&strName(9)&"",""&strName(11)&""'> " objFile.Close Next strmenurpinstall = "<h2>Instalki oparte na repozytorium z konfiguracją</h2>" & strinstalki_repo_conf End If If objFSO.FileExists(arrCommands(1)&"\wim\455asd8.znk") Then Set folder = objfso.GetFolder(arrCommands(1)&"\wim\systemy") Set files = folder.Files For each folderIdx In files Set objFile = objFSO.OpenTextFile(arrCommands(1)&"\wim\systemy\"& folderIdx.Name,1) strName = split(objFile.ReadAll,vbcrlf) strinstalki_WIM = strinstalki_WIM & "<input class='button' type='button' onmouseover='MouseOver' onmouseout='MouseOut' value='Zainstaluj "&strName(1)&"' onClick='Install_WIM ""&strName(1)&"",""&strName(3)&"",""&strName(5)&"",""&strName(7)&"",""&strName(9)&"",""&strName(11)&"",""&strName(13)&"",""&strName(15)&""'> " objFile.Close Next strmenuwiminstall = "<h2>Instalki oparte na pliku WIM</h2>" & strinstalki_WIM End If strmenu1 = "<input class='button2' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='Notatnik' onClick='ntp'> <input class='button2' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='Taskmgr' onClick='tskmgr'> <input class='button2' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='Konsola' onClick='cmd'><br>" strmenu2 = "<input class='button2' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='TotalCmd' onClick='totalcmd'> <input class='button2' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='Ghost 32' onClick='ghost'> <input class='button2' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='Partition Wizzard' onClick='pw'><br>" strmenu3 = "<input class='button2' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='Start Sieci' onClick='NET'> <input class='button2' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='Restart' onClick='wyjscie(2)'> <input class='button2' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='Clam Portable Antywir' onClick='clamWinPortable'><br>" strmenu5 = "<br><input class='button2' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='Quit' onClick='wyjscie(1)'><br>" IF objFSO.FileExists(arrCommands(1)&"\Vista_installer\455asd8.znk") And objFSO.FileExists(arrCommands(1)&"\Seven_Installer\455asd8.znk") And objFSO.FileExists(arrCommands(1)&"\W8_Installer\455asd8.znk") Then strmenu4 = "<input class='button' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='Instalacja systemów Vista lub Server 2008' onClick='Vista_Inst'> <input class='button' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='Instalacja systemów Seven lub Server 2008 R2' onClick='Seven_Inst'> <input class='button' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='Instalacja Windows 8' onClick='W8_Inst'>" strmenuvistainstall = "<h2>Instalki systemów z lini Vista, Windows 7 i Windows 8</h2>" & strmenu4 ElseIf objFSO.FileExists(arrCommands(1)&"\Vista_installer\455asd8.znk") And objFSO.FileExists(arrCommands(1)&"\Seven_Installer\455asd8.znk") Then strmenu4 = "<input class='button' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='Instalacja systemów Vista lub Server 2008' onClick='Vista_Inst'> <input class='button' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='Instalacja systemów Seven lub Server 2008 R2' onClick='Seven_Inst'>" strmenuvistainstall = "<h2>Instalki systemów z lini Vista i Seven</h2>" & strmenu4 ElseIf objFSO.FileExists(arrCommands(1)&"\Vista_installer\455asd8.znk") And objFSO.FileExists(arrCommands(1)&"\W8_Installer\455asd8.znk") Then strmenu4 = "<input class='button' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='Instalacja systemów Vista lub Server 2008' onClick='Vista_Inst'> <input class='button' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='Instalacja Windows 8' onClick='W8_Inst'>" strmenuvistainstall = "<h2>Instalki systemów z lini Vista i Windows 8</h2>" & strmenu4 ElseIf objFSO.FileExists(arrCommands(1)&"\Seven_Installer\455asd8.znk") And objFSO.FileExists(arrCommands(1)&"\W8_Installer\455asd8.znk") Then strmenu4 = "<input class='button' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='Instalacja systemów Seven lub Server 2008 R2' onClick='Seven_Inst'> <input class='button' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='Instalacja Windows 8' onClick='W8_Inst'>" strmenuvistainstall = "<h2>Instalki systemów z lini Windows 7 i Windows 8</h2>" & strmenu4 ElseIf objFSO.FileExists(arrCommands(1)&"\Seven_Installer\455asd8.znk") Then strmenu4 = "<input class='button' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='Instalacja systemów Seven lub Server 2008 R2' onClick='Seven_Inst'>" strmenuvistainstall = "<h2>Instalki systemów z lini Seven</h2>" & "<p>" & strmenu4 & "</p>" ElseIf objFSO.FileExists(arrCommands(1)&"\Vista_installer\455asd8.znk") Then strmenu4 = "<input class='button' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='Instalacja systemów Vista lub Server 2008' onClick='Vista_Inst'>" strmenuvistainstall = "<h2>Instalki systemów z lini Vista</h2>" & "<p>" & strmenu4 & "</p>" ElseIf objFSO.FileExists(arrCommands(1)&"\W8_installer\455asd8.znk") Then strmenu4 = "<input class='button' onmouseover='MouseOver' onmouseout='MouseOut' type='button' value='Instalacja systemów W8' onClick='W8_Inst'>" strmenuvistainstall = "<h2>Instalki systemów z lini Windows 8</h2>" & "<p>" & strmenu4 & "</p>" End If MENU.InnerHTML = "<p>" & strmenurpinstall & "</p>" & "<p>" & strmenuwiminstall & "</p>" & "<p>" & strmenuvistainstall & "</p>" & "<h2>Narzędzia</h2>" & "<p>" & strmenu1 & strmenu2 & strmenu3 & strmenu5 & "</p>" End Sub Sub Install_WIM(system,arg_1,arg_2,arg_3,arg_4,arg_5,arg_6,arg_7) Window.resizeTo 800,350 MENU.InnerHTML = "" DataArea.InnerHTML = "" TextArea.InnerHTML = "" On Error Resume Next Set colDisks = objWMIService.ExecQuery("Select * from Win32_LogicalDisk Where (DriveType = 3 OR DriveType = 2) AND DeviceID <> 'A:' AND DeviceID <> 'X:' AND DeviceID <> '" & arrCommands(1) & "'") 'Set colDisks = objWMIService.ExecQuery("Select * from Win32_LogicalDisk Where DriveType = 3 AND DeviceID <> 'x:' AND DeviceID <> '" & arrCommands(1) & "'") For Each objDisk in colDisks strBody4 = strBody4 & "<option value='"& objDisk.DeviceID &"'>"& objDisk.DeviceID &"</option>" Next set colSubfolders = objWMIService.ExecQuery("Associators of {Win32_Directory.Name='"&arrCommands(1)&"\"&arg_3&"'} Where AssocClass = Win32_Subdirectory ResultRole = PartComponent") For Each objFolder in colSubfolders strBody5 = strBody5 & "<option value='"&arrCommands(1)&"\"&arg_3&"\"&objFolder.fileName&"'>"& objFolder.fileName &"</option>" Next Set colSubfolders = objWMIService.ExecQuery("Associators of {Win32_Directory.Name='"&arrCommands(1)&"\"&arg_4&"'} Where AssocClass = Win32_Subdirectory ResultRole = PartComponent") For Each objFolder in colSubfolders strBody6 = strBody6 & "<option value='"&arrCommands(1)&"\"&arg_4&"\"&objFolder.fileName&"'>"& objFolder.fileName &"</option>" Next Set folder = objfso.GetFolder(arrCommands(1)&"\wim\pliki\dp") Set files = folder.Files For each folderIdx In files strBody8 = strBody8 & "<option value='"&folderIdx.Name&"'>"& folderIdx.Name &"</option>" Next str0 = "<option value='null'>null</option>" str1 = "<span style='display:inline width:60px; position:absolute; top:15%; left:5%'><select size='1' name='AvailableDrives'>" str2 = "<input class='button' type='button' value='Potwierdź wybór' onClick='sys_inst_WIM' style='left:25%; top:70%; width:125px;'>" str3 = "<input class='button' type='button' value='Rezygnuję' onClick='Cancel' style='left:45%; top:70%; width:125px;'>" str4 = "<span style='display:inline width:60px; position:absolute; top:22%; left:5%'><select size='1' name='AvailableOEMS'>" str5 = "<span style='display:inline width:60px; position:absolute; top:45%; left:5%'><input type='checkbox' name='chkbox1' checked='True'> Nienadzorowana</span>" str6 = "<span style='display:inline width:60px; position:absolute; top:29%; left:5%'><select size='1' name='AvailableMASS'>" str7 = "<span style='display:inline width:60px; position:absolute; top:55%; left:5%'><input type='checkbox' name='chkbox2'> Użyj katalogu $OEM$</span>" str9 = "<span style='display:inline width:60px; position:absolute; top:65%; left:5%'><input type='checkbox' name='chkbox3' checked='True'> Autorestart</span>" str8 = "<span style='display:inline width:100px; position:absolute; top:36%; left:5%'><select size='1' name='AvailableDP'>" str10 = "<span style='display:inline width:60px; position:absolute; top:75%; left:5%'><input type='checkbox' name='chkbox4'> Użyj klucza domyślnego</span>" DataArea.InnerHTML = "<h2>Instalacja WIM " & system & "</h2>" & str1 & str0 & strBody4 & "</select>" & " Proszę wybrać partycę docelową</Span>" & str4 & str0 & strBody5 & "</select>" & " Proszę wybrać dostawcę OEM</Span>" & str6 & str0 & strBody6 & "</select>" & " Proszę wybrać Sterowniki MassStorage</Span>" & str5 & str8 & str0 & strBody8 & "</select>" & " Proszę wybrać plik konfiguracji dysku</Span>" & str7 & str9 & str10 & str2 & str3 strSystem = system Wim_name = arg_1 Wim_index = arg_2 wim_oembios = arg_3 wim_massstorage = arg_4 pliki_oem = arg_5 plik_unattended = arg_6 default_key = arg_7 End Sub Sub sys_inst_WIM If AvailableDP.Value <> "null" Then strDrive = "V:" ElseIf AvailableDrives.Value = "null" Then Func_Back_WIM Exit Sub Else strDrive = AvailableDrives.Value End If strMassStorage = AvailableMASS.Value strOEM = AvailableOEMS.Value strDP = AvailableDP.Value if chkbox1.Checked then chkbox1_WIM = "TAK" Set objFile = objFSO.OpenTextFile(arrCommands(1)&"\"&plik_unattended,1,true) strUnAtt = objFile.ReadAll objFile.Close Else if chkbox4.Checked then chkbox4_WIM = "TAK" strdefkey = "[userdata]" & vbCrLf & "productid=" & default_key & vbCrLf & "productkey=" & default_key & vbCrLf end if strUnAtt = "[data]" & vbCrLf & "msdosinitiated=1" & vbCrLf & "floppyless=1" & vbCrLf & "AutoPartition=1" & vbCrLf & "UseSignatures=yes" & vbCrLf & "OriSrc=A:\I386" & vbCrLf & "OriTyp=5" & vbCrLf strnonunat = "[unattended]" & vbCrLf & "OemPreinstall=Yes" &vbCrLf& "DriverSigningPolicy=Ignore" &vbCrLf end If if chkbox2.Checked then chkbox2_WIM = "TAK" end if if chkbox3.Checked then chkbox3_WIM = "TAK" end if DataArea.InnerHTML = "" TextArea.InnerHTML = "" window.resizeTo 768,120 TextArea.InnerHTML = "Proszę czekać,<br>trwa Instalacja " & strSystem If strdp <> "null" Then objShell.run ("%comspec% /c diskpart /s "&chr(34)&arrCommands(1)&"\wim\pliki\DP\"&strDP&chr(34)),0,true Else set colVolumes = objWMIService.ExecQuery("select * from Win32_Volume Where Name = '"&strDrive&"\\'") For Each objVolume in colVolumes objVolume.Format "NTFS",True,,"",False If Not objFSO.FileExists("x:\windows\temp\dp.txt") Then Set objFile = objFSO.CreateTextFile("x:\windows\temp\dp.txt", True) objFile.WriteLine "select volume " & strDrive & vbCrLf & "active" & vbCrLf & "exit" objFile.close End If objShell.Run ("%comspec% /c diskpart /s x:\windows\temp\dp.txt"),0,true objFSO.DeleteFile "x:\windows\temp\dp.txt" Next End If objShell.run ("bootsect.exe /nt52 " & strDrive & " /force /mbr"),0,true objShell.run ("imagex.exe /apply "&arrCommands(1)&"\wim\"&Wim_name&" "&Wim_index&" "&strDrive),0,true Set objFile = objFSO.CreateTextFile(strDrive&"\$WIN_NT$.~BT\winnt.sif",true) objFile.Write strUnAtt & strdefkey objFile.Close 'objShell.run ("wpeutil.exe reboot"),0,false if chkbox2_WIM = "TAK" then objFso.CopyFolder arrCommands(1)&"\"&pliki_oem, strDrive&"\$WIN_NT$.~LS\$OEM$", True end if If strOEM <> "null" Then objFSO.CopyFile strOEM&"\*", strDrive&"\$WIN_NT$.~LS\I386\", True End IF If strMassStorage <> "null" Then Set objFile = objFSO.OpenTextFile(strMassStorage&"\untd.txt",1,true) strMass = objFile.ReadAll objFile.close Set objFile = objFSO.CreateTextFile(strDrive&"\$WIN_NT$.~BT\winnt.sif",true) objFile.Write strUnAtt & strnonunat & strdefkey & strMass objFile.Close If Not objFso.FolderExists(strDrive&"\$WIN_NT$.~LS\$OEM$") Then Set f = objFso.CreateFolder(strDrive&"\$WIN_NT$.~LS\$OEM$") End If Set f = Nothing objFso.CopyFolder strMassStorage&"\txtsetup", strDrive&"\$WIN_NT$.~LS\$OEM$\TEXTMODE", True objFso.CopyFolder strMassStorage&"\txtsetup", strDrive&"\$WIN_NT$.~BT\$OEM$", True End If IF chkbox3_Wim = "TAK" then objShell.Run ("Wpeutil Reboot"),0,false End If window.resizeTo 800,600 MenuSystem DataArea.InnerHTML = "" TextArea.InnerHTML = "" End sub Sub Func_Back_WIM DataArea.InnerHTML = "" TextArea.InnerHTML = "" window.resizeTo 512,120 strbck1 = "<input class='button' type='button' value='Wróć' onClick='Install_WIM ""&strSystem&"",""&Wim_name&"",""&Wim_index&"",""&wim_oembios&"",""&wim_massstorage&"",""&pliki_oem&"",""&plik_unattended&"",""&default_key&""' style='left:5%; top:65%; width:125px;'>" strbck2 = "<input class='button' type='button' value='Diskpart' onClick='diskpart' style='left:10%; top:65%; width:125px;'>" strbck3 = "<input class='button' type='button' value='Rezygnuję' onClick='Cancel' style='left:15%; top:65%; width:125px;'>" TextArea.InnerHTML = "Nie wybrano partycji docelowej" DataArea.InnerHTML = strbck1 & strbck2 & strbck3 End Sub Sub Install_repo_conf(system,arg_1,arg_2,arg_3,arg_4,arg_5) Window.resizeTo 800,350 MENU.InnerHTML = "" DataArea.InnerHTML = "" TextArea.InnerHTML = "" On Error Resume Next Set colDisks = objWMIService.ExecQuery("Select * from Win32_LogicalDisk Where (DriveType = 3 OR DriveType = 2) AND DeviceID <> 'A:' AND DeviceID <> 'X:' AND DeviceID <> '" & arrCommands(1) & "'") For Each objDisk in colDisks strBody4 = strBody4 & "<option value='"& objDisk.DeviceID &"'>"& objDisk.DeviceID &"</option>" Next set colSubfolders = objWMIService.ExecQuery("Associators of {Win32_Directory.Name='"&arrCommands(1)&"\"&arg_2&"'} Where AssocClass = Win32_Subdirectory ResultRole = PartComponent") For Each objFolder in colSubfolders strBody5 = strBody5 & "<option value='"&arrCommands(1)&"\"&arg_2&"\"&objFolder.fileName&"'>"& objFolder.fileName &"</option>" Next Set colSubfolders = objWMIService.ExecQuery("Associators of {Win32_Directory.Name='"&arrCommands(1)&"\"&arg_3&"'} Where AssocClass = Win32_Subdirectory ResultRole = PartComponent") For Each objFolder in colSubfolders strBody6 = strBody6 & "<option value='"&arrCommands(1)&"\"&arg_3&"\"&objFolder.fileName&"'>"& objFolder.fileName &"</option>" Next Set folder = objfso.GetFolder(arrCommands(1)&"\repozytorium\pliki\dp") Set files = folder.Files For each folderIdx In files strBody8 = strBody8 & "<option value='"&folderIdx.Name&"'>"& folderIdx.Name &"</option>" Next str0 = "<option value='null'>null</option>" str1 = "<span style='display:inline width:60px; position:absolute; top:15%; left:5%'><select size='1' name='AvailableDrives'>" str2 = "<input class='button' type='button' value='Potwierdź wybór' onClick='sys_inst_repo_conf' style='left:25%; top:60%; width:125px;'>" str3 = "<input class='button' type='button' value='Rezygnuję' onClick='Cancel' style='left:45%; top:60%; width:125px;'>" str4 = "<span style='display:inline width:60px; position:absolute; top:22%; left:5%'><select size='1' name='AvailableOEMS'>" str5 = "<span style='display:inline width:60px; position:absolute; top:45%; left:5%'><input type='checkbox' name='chkbox1' checked='True'> Nienadzorowana</span>" str6 = "<span style='display:inline width:60px; position:absolute; top:29%; left:5%'><select size='1' name='AvailableMASS'>" str7 = "<span style='display:inline width:60px; position:absolute; top:55%; left:5%'><input type='checkbox' name='chkbox2'> Użyj katalogu $OEM$</span>" str9 = "<span style='display:inline width:60px; position:absolute; top:65%; left:5%'><input type='checkbox' name='chkbox3' checked='True'> Autorestart</span>" str8 = "<span style='display:inline width:100px; position:absolute; top:36%; left:5%'><select size='1' name='AvailableDP'>" DataArea.InnerHTML = "<h2>Instalacja repozytorium z konfiguracją " & system & "</h2>" & str1 & str0 & strBody4 & "</select>" & " Proszę wybrać partycę docelową</Span>" & str4 & str0 & strBody5 & "</select>" & " Proszę wybrać dostawcę OEM</Span>" & str6 & str0 & strBody6 & "</select>" & " Proszę wybrać Sterowniki MassStorage</Span>" & str5 & str8 & str0 & strBody8 & "</select>" & " Proszę wybrać plik konfiguracji dysku</Span>" & str7 & str9 & str10 & str2 & str3 strSystem = system rc_name = arg_1 rc_oembios = arg_2 rc_massstorage = arg_3 pliki_oem = arg_4 plik_unattended = arg_5 End Sub Sub sys_inst_repo_conf If AvailableDP.Value <> "null" Then strDrive = "V:" ElseIf AvailableDrives.Value = "null" Then Func_Back_repo_conf Exit Sub Else strDrive = AvailableDrives.Value End If strMassStorage = AvailableMASS.Value strOEM = AvailableOEMS.Value strDP = AvailableDP.Value if chkbox1.Checked then chkbox1_rc = "TAK" strunattended = " /unattend:" & arrCommands(1)&"\"&plik_unattended Set objFile = objFSO.OpenTextFile(arrCommands(1)&"\"&plik_unattended,1,true) strUnAtt = objFile.ReadAll objFile.Close Else strnonunat = "[unattended]" & vbCrLf & "OemPreinstall=Yes" &vbCrLf& "DriverSigningPolicy=Ignore" &vbCrLf end If if chkbox2.Checked then chkbox2_rc = "TAK" end if if chkbox3.Checked then chkbox3_rc = "TAK" end if DataArea.InnerHTML = "" TextArea.InnerHTML = "" window.resizeTo 768,120 TextArea.InnerHTML = "Proszę czekać,<br>trwa Instalacja " & strSystem If strdp <> "null" Then objShell.run ("%comspec% /c diskpart /s "&chr(34)&arrCommands(1)&"\repozytorium\pliki\DP\"&strDP&chr(34)),0,true Else set colVolumes = objWMIService.ExecQuery("select * from Win32_Volume Where Name = '"&strDrive&"\\'") For Each objVolume in colVolumes objVolume.Format "NTFS",True,,"",False If Not objFSO.FileExists("x:\windows\temp\dp.txt") Then Set objFile = objFSO.CreateTextFile("x:\windows\temp\dp.txt", True) objFile.WriteLine "select volume " & strDrive & vbCrLf & "active" & vbCrLf & "exit" objFile.close End If objShell.Run ("%comspec% /c diskpart /s x:\windows\temp\dp.txt"),0,true objFSO.DeleteFile "x:\windows\temp\dp.txt" Next End If objShell.run ("bootsect.exe /nt52 " & strDrive & " /force /mbr"),0,true objShell.run (arrCommands(1) & "\repozytorium\instalatory\"&rc_name&"\i386\winnt32.exe /makelocalsource /noreboot /syspart:" & strDrive & " /tempdrive:" & strDrive &strunattended),0,true if chkbox2_rc = "TAK" then objFso.CopyFolder arrCommands(1)&"\"&pliki_oem, strDrive&"\$WIN_NT$.~LS\$OEM$", True end if If strOEM <> "null" Then objFSO.CopyFile strOEM&"\*", strDrive&"\$WIN_NT$.~LS\I386\", True End IF If strMassStorage <> "null" Then Set objFile = objFSO.OpenTextFile(strDrive&"\$WIN_NT$.~BT\winnt.sif",1,true) strUnAtt = objFile.ReadAll objFile.Close Set objFile = objFSO.OpenTextFile(strMassStorage&"\untd.txt",1,true) strMass = objFile.ReadAll objFile.close Set objFile = objFSO.CreateTextFile(strDrive&"\$WIN_NT$.~BT\winnt.sif",true) objFile.Write strUnAtt & strnonunat & strMass objFile.Close If Not objFso.FolderExists(strDrive&"\$WIN_NT$.~LS\$OEM$") Then Set f = objFso.CreateFolder(strDrive&"\$WIN_NT$.~LS\$OEM$") End If Set f = Nothing objFso.CopyFolder strMassStorage&"\txtsetup", strDrive&"\$WIN_NT$.~LS\$OEM$\TEXTMODE", True objFso.CopyFolder strMassStorage&"\txtsetup", strDrive&"\$WIN_NT$.~BT\$OEM$", True End If IF chkbox3_rc = "TAK" then objShell.Run ("Wpeutil Reboot"),0,false End If window.resizeTo 800,600 MenuSystem DataArea.InnerHTML = "" TextArea.InnerHTML = "" End sub Sub Func_Back_repo_conf DataArea.InnerHTML = "" TextArea.InnerHTML = "" window.resizeTo 512,120 strbck1 = "<input class='button' type='button' value='Wróć' onClick='install_repo_conf ""&strSystem&"",""&rc_name&"",""&rc_oembios&"",""&rc_massstorage&"",""&pliki_oem&"",""&plik_unattended&""' style='left:5%; top:65%; width:125px;'>" strbck2 = "<input class='button' type='button' value='Diskpart' onClick='diskpart' style='left:10%; top:65%; width:125px;'>" strbck3 = "<input class='button' type='button' value='Rezygnuję' onClick='Cancel' style='left:15%; top:65%; width:125px;'>" TextArea.InnerHTML = "Nie wybrano partycji docelowej" DataArea.InnerHTML = strbck1 & strbck2 & strbck3 End Sub Sub Vista_Inst Window.resizeTo 750,250 MENU.InnerHTML = "" DataArea.InnerHTML = "" TextArea.InnerHTML = "" On Error Resume Next Set folder = objfso.GetFolder(arrCommands(1)&"\vista_Installer\vista_unattend") Set files = folder.Files For each folderIdx In files strBody42 = strBody42 & "<option value='"&folderIdx.Name&"'>"& folderIdx.Name &"</option>" Next Set colSubfolders = objWMIService.ExecQuery("Associators of {Win32_Directory.Name='"&arrCommands(1)&"\vista_Installer\vista_unattend\AOems'} Where AssocClass = Win32_Subdirectory ResultRole = PartComponent") For Each objFolder in colSubfolders strBody45 = strBody45 & "<option value='"&objFolder.Name&"'>"& objFolder.fileName &"</option>" Next Set folder = objfso.GetFolder(arrCommands(1)&"\vista_Installer\vista_unattend\dp") Set files = folder.Files For each folderIdx In files strBody48 = strBody48 & "<option value='"&folderIdx.Name&"'>"& folderIdx.Name &"</option>" Next str40 = "<option value='null'>null</option>" str41 = "<span style='display:inline width:60px; position:absolute; top:15%; left:5%'><select size='1' name='AvailableUnattend'>" str43 = "<input class='button' type='button' value='Potwierdź wybór' onClick='Vista_Instal' style='left:25%; top:50%; width:125px;'>" str44 = "<input class='button' type='button' value='Rezygnuję' onClick='Cancel' style='left:35%; top:50%; width:125px;'>" str46 = "<span style='display:inline width:80px; position:absolute; top:30%; left:5%'><select size='1' name='AvailableAOems'>" str47 = "<span style='display:inline width:60px; position:absolute; top:60%; left:5%'><input type='checkbox' name='chkbox1' checked='True'> Autorestart</span>" str48 = "<span style='display:inline width:100px; position:absolute; top:45%; left:5%'><select size='1' name='AvailableDP'>" DataArea.InnerHTML = "<h2>Instalacja Systemu Vista lub Server 2008</h2>" & str41 & str40 & strBody42 & "</select>" & " Proszę wybrać plik instalacji nienadzorowanej</Span>" & str46 & str40 & strBody45 & "</select>" & " Proszę wybrać Alternatywny katalog $OEM$</Span>" & str48 & str40 & strBody48 & "</select>" & " Proszę wybrać skrypt przygotowujący dysk</Span>" & str47 & str43 & str44 End Sub Sub Vista_Instal strunattend = AvailableUnattend.Value straoems = AvailableAOems.Value strdp = AvailableDP.Value if chkbox1.Checked then chkbox1_Vista = "TAK" end if MENU.InnerHTML = "" DataArea.InnerHTML = "" TextArea.InnerHTML = "" window.resizeTo 725,160 TextArea.InnerHTML = "Instalacja systemów z lini Vista<br>Windows Vista, Serwer 2008" If strdp <> "null" Then objShell.run ("%comspec% /c" & "diskpart /s "&chr(34)&arrCommands(1)&"\vista_Installer\vista_unattend\DP\"&strDP&chr(34)),0,true End If If strunattend = "null" AND straoems = "null" Then objShell.run (arrCommands(1) & "\vista_Installer\setup.exe /noreboot"),0,true ElseIF strunattend <> "null" AND straoems = "null" Then objShell.run (arrCommands(1) & "\vista_Installer\setup.exe /noreboot /unattend:"&arrCommands(1)&"\vista_Installer\vista_unattend\"&strunattend),0,true ElseIF strunattend = "null" AND straoems <> "null" Then objShell.run (arrCommands(1) & "\vista_Installer\setup.exe /noreboot /m:"&straoems),0,true Else objShell.run (arrCommands(1) & "\vista_Installer\setup.exe /noreboot /m:"&straoems&" /unattend:"&arrCommands(1)&"\vista_Installer\vista_unattend\"&strunattend),0,true End If IF chkbox1_Vista = "TAK" then self.close() End If window.resizeTo 1024,768 MenuSystem TextArea.InnerHTML = "" End Sub Sub Seven_Inst Window.resizeTo 750,250 MENU.InnerHTML = "" DataArea.InnerHTML = "" TextArea.InnerHTML = "" On Error Resume Next Set folder = objfso.GetFolder(arrCommands(1)&"\seven_Installer\seven_unattend") Set files = folder.Files For each folderIdx In files strBody22 = strBody22 & "<option value='"&folderIdx.Name&"'>"& folderIdx.Name &"</option>" Next Set colSubfolders = objWMIService.ExecQuery("Associators of {Win32_Directory.Name='"&arrCommands(1)&"\seven_Installer\seven_unattend\AOems'} Where AssocClass = Win32_Subdirectory ResultRole = PartComponent") For Each objFolder in colSubfolders strBody25 = strBody25 & "<option value='"&objFolder.Name&"'>"& objFolder.FileName &"</option>" Next Set folder = objfso.GetFolder(arrCommands(1)&"\seven_Installer\seven_unattend\dp") Set files = folder.Files For each folderIdx In files strBody28 = strBody28 & "<option value='"&folderIdx.Name&"'>"& folderIdx.Name &"</option>" Next str20 = "<option value='null'>null</option>" str21 = "<span style='display:inline width:60px; position:absolute; top:15%; left:5%'><select size='1' name='AvailableUnattend'>" str23 = "<input class='button' type='button' value='Potwierdź wybór' onClick='Seven_Instal' style='left:25%; top:50%; width:125px;'>" str24 = "<input class='button' type='button' value='Rezygnuję' onClick='Cancel' style='left:35%; top:50%; width:125px;'>" str26 = "<span style='display:inline width:80px; position:absolute; top:30%; left:5%'><select size='1' name='AvailableAOems'>" str27 = "<span style='display:inline width:60px; position:absolute; top:60%; left:5%'><input type='checkbox' name='chkbox1' checked='True'> Autorestart</span>" str28 = "<span style='display:inline width:100px; position:absolute; top:45%; left:5%'><select size='1' name='AvailableDP'>" DataArea.InnerHTML = "<h2>Instalacja Systemu z lini Seven</h2>" & str21 & str20 & strBody22 & "</select>" & " Proszę wybrać plik instalacji nienadzorowanej</Span>" & str26 & str20 & strBody25 & "</select>" & " Proszę wybrać Alternatywny katalog $OEM$</Span>" & str28 & str20 & strBody28 & "</select>" & " Proszę wybrać skrypt przygotowujący dysk</Span>" & str27 & str23 & str24 End Sub Sub Seven_Instal strunattend = AvailableUnattend.Value straoems = AvailableAOems.Value strdp = AvailableDP.Value if chkbox1.Checked then chkbox1_Seven = "TAK" end if MENU.InnerHTML = "" DataArea.InnerHTML = "" TextArea.InnerHTML = "" window.resizeTo 725,160 TextArea.InnerHTML = "Instalacja systemów z lini Seven<br>Windows Seven, Serwer 2008 R2" If strdp <> "null" Then objShell.run ("%comspec% /c" & "diskpart /s "&chr(34)&arrCommands(1)&"\seven_Installer\seven_unattend\DP\"&strDP&chr(34)),0,true End If If strunattend = "null" AND straoems = "null" Then objShell.run (arrCommands(1) & "\seven_Installer\setup.exe /noreboot"),0,true ElseIF strunattend <> "null" AND straoems = "null" Then objShell.run (arrCommands(1) & "\seven_Installer\setup.exe /noreboot /unattend:"&arrCommands(1)&"\seven_Installer\seven_unattend\"&strunattend),0,true ElseIF strunattend = "null" AND straoems <> "null" Then objShell.run (arrCommands(1) & "\seven_Installer\setup.exe /noreboot /m:"&straoems),0,true Else objShell.run (arrCommands(1) & "\seven_Installer\setup.exe /noreboot /m:"&straoems&" /unattend:"&arrCommands(1)&"\seven_Installer\seven_unattend\"&strunattend),0,true End If IF chkbox1_Seven = "TAK" then self.close() End If window.resizeTo 1024,768 MenuSystem TextArea.InnerHTML = "" End Sub sub cancel DataArea.InnerHTML = "" TextArea.InnerHTML = "" window.resizeTo 800,600 MenuSystem end sub Sub W8_Inst Window.resizeTo 750,250 MENU.InnerHTML = "" DataArea.InnerHTML = "" TextArea.InnerHTML = "" On Error Resume Next Set folder = objfso.GetFolder(arrCommands(1)&"\W8_installer\seven_unattend") Set files = folder.Files For each folderIdx In files strBody22 = strBody22 & "<option value='"&folderIdx.Name&"'>"& folderIdx.Name &"</option>" Next Set colSubfolders = objWMIService.ExecQuery("Associators of {Win32_Directory.Name='"&arrCommands(1)&"\W8_installer\seven_unattend\AOems'} Where AssocClass = Win32_Subdirectory ResultRole = PartComponent") For Each objFolder in colSubfolders strBody25 = strBody25 & "<option value='"&objFolder.Name&"'>"& objFolder.FileName &"</option>" Next Set folder = objfso.GetFolder(arrCommands(1)&"\W8_installer\seven_unattend\dp") Set files = folder.Files For each folderIdx In files strBody28 = strBody28 & "<option value='"&folderIdx.Name&"'>"& folderIdx.Name &"</option>" Next str50 = "<option value='null'>null</option>" str51 = "<span style='display:inline width:60px; position:absolute; top:15%; left:5%'><select size='1' name='AvailableUnattend'>" str53 = "<input class='button' type='button' value='Potwierdź wybór' onClick='Seven_Instal' style='left:25%; top:50%; width:125px;'>" str54 = "<input class='button' type='button' value='Rezygnuję' onClick='Cancel' style='left:35%; top:50%; width:125px;'>" str56 = "<span style='display:inline width:80px; position:absolute; top:30%; left:5%'><select size='1' name='AvailableAOems'>" str57 = "<span style='display:inline width:60px; position:absolute; top:60%; left:5%'><input type='checkbox' name='chkbox1' checked='True'> Autorestart</span>" str58 = "<span style='display:inline width:100px; position:absolute; top:45%; left:5%'><select size='1' name='AvailableDP'>" DataArea.InnerHTML = "<h2>Instalacja Systemu z lini Windows 8</h2>" & str51 & str50 & strBody22 & "</select>" & " Proszę wybrać plik instalacji nienadzorowanej</Span>" & str56 & str50 & strBody25 & "</select>" & " Proszę wybrać Alternatywny katalog $OEM$</Span>" & str58 & str20 & strBody28 & "</select>" & " Proszę wybrać skrypt przygotowujący dysk</Span>" & str57 & str53 & str54 End Sub Sub W8_Instal strunattend = AvailableUnattend.Value straoems = AvailableAOems.Value strdp = AvailableDP.Value if chkbox1.Checked then chkbox1_W8 = "TAK" end if MENU.InnerHTML = "" DataArea.InnerHTML = "" TextArea.InnerHTML = "" window.resizeTo 725,160 TextArea.InnerHTML = "Instalacja systemów z lini Windows 8<br>Windows 8" If strdp <> "null" Then objShell.run ("%comspec% /c" & "diskpart /s "&chr(34)&arrCommands(1)&"\W8_installer\seven_unattend\DP\"&strDP&chr(34)),0,true End If If strunattend = "null" AND straoems = "null" Then objShell.run (arrCommands(1) & "\W8_installer\setup.exe /noreboot"),0,true ElseIF strunattend <> "null" AND straoems = "null" Then objShell.run (arrCommands(1) & "\W8_installer\setup.exe /noreboot /unattend:"&arrCommands(1)&"\W8_installer\seven_unattend\"&strunattend),0,true ElseIF strunattend = "null" AND straoems <> "null" Then objShell.run (arrCommands(1) & "\W8_installer\setup.exe /noreboot /m:"&straoems),0,true Else objShell.run (arrCommands(1) & "\W8_installer\setup.exe /noreboot /m:"&straoems&" /unattend:"&arrCommands(1)&"\W8_installer\seven_unattend\"&strunattend),0,true End If IF chkbox1_W8 = "TAK" then self.close() End If window.resizeTo 1024,768 MenuSystem TextArea.InnerHTML = "" End Sub sub cancel DataArea.InnerHTML = "" TextArea.InnerHTML = "" window.resizeTo 800,600 MenuSystem end sub Sub ghost MENU.InnerHTML = "" window.resizeTo 512,80 TextArea.InnerHTML = "Uruchomiono Ghost 32" objShell.Run (arrCommands(1) & "\tools\ghost32.exe -prefos"),0,True window.resizeTo 800,600 MenuSystem TextArea.InnerHTML = "" End Sub Sub ntp MENU.InnerHTML = "" window.resizeTo 512,80 TextArea.InnerHTML = "Uruchomiono Notatnik" objShell.Run ("notepad"),1,True window.resizeTo 800,600 MenuSystem TextArea.InnerHTML = "" End Sub Sub cmd MENU.InnerHTML = "" window.resizeTo 512,80 TextArea.InnerHTML = "Uruchomiono Wiersz Poleceń" objShell.Run ("%comspec%"),1,True window.resizeTo 800,600 MenuSystem TextArea.InnerHTML = "" End Sub Sub NET MENU.InnerHTML = "" window.resizeTo 512,80 TextArea.InnerHTML = "Startuje sieć" objShell.Run ("wpeutil InitializeNetwork"),0,True objShell.Run ("wpeutil DisableFirewall"),0,True window.resizeTo 800,600 MenuSystem TextArea.InnerHTML = "" End Sub Sub totalcmd MENU.InnerHTML = "" window.resizeTo 512,80 TextArea.InnerHTML = "Uruchomiono TotalCmd" objShell.Run (arrCommands(1) & "\tools\totalcmd7\TOTALCMD.EXE /I=.\wincmd.ini /F=.\wcx_ftp.ini"),0,True window.resizeTo 800,600 MenuSystem TextArea.InnerHTML = "" End Sub Sub pw MENU.InnerHTML = "" window.resizeTo 512,80 TextArea.InnerHTML = "Uruchomiono Partition Wizzard" objShell.Run (arrCommands(1) & "\tools\PartitionWizard\PartitionWizard.exe"),0,True window.resizeTo 800,600 MenuSystem TextArea.InnerHTML = "" End Sub Sub tskmgr MENU.InnerHTML = "" window.resizeTo 512,80 TextArea.InnerHTML = "Uruchomiono Menedżer zadań" objShell.Run ("taskmgr"),1,True window.resizeTo 800,600 MenuSystem TextArea.InnerHTML = "" End Sub Sub clamwinportable MENU.InnerHTML = "" window.resizeTo 512,80 TextArea.InnerHTML = "Uruchomiono Clam Win Portable" objShell.Run (arrCommands(1) & "\tools\Antywiry\ClamWinPortable\ClamWinPortable.exe"),0,True window.resizeTo 800,600 MenuSystem TextArea.InnerHTML = "" End Sub sub wyjscie(str_str) If str_str = 1 Then self.close() ElseIf str_str = 2 Then objShell.Run ("Wpeutil Reboot"),0,false End If end sub Sub MouseOver Set x = window.event.srcElement x.style.cursor = "HAND" x.className = x.classname & "_hover" End Sub Sub MouseOut Set x = window.event.srcElement x.style.cursor = "default" x.className = split(x.className,"_")(0) End sub </script> <body id=body> <span id=menu></span> <span id=DataArea></span> <span id=TextArea></span> Niestety po wybraniu parametrów instalki W8 generuje komunikat ze nie ma pliku seven_Installer\seven_unattend\V64.xml.No niema, bo jest w W8_Installer\seven_unattend\. Pytanie dlaczego go tam nie szuka ? Prosze o pomoc i pozdrawiam PS Zmieniły się wymagania co do instalacji nienadzorowanej Windows 8 - konieczne jest podanie klucza produktu już w pierwszej sekcji. Minimum to (prawie minimum - ustawienie locale można pominąć): <?xml version='1.0' encoding='utf-8'?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="windowsPE"> <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ImageInstall> <OSImage> <InstallFrom> <Path>%litera%\wim\Windows8x64.wim</Path> </InstallFrom> <WillShowUI>OnError</WillShowUI> </OSImage> </ImageInstall> <UserData> <AcceptEula>true</AcceptEula> <ProductKey> <Key>H9VCT-63NFW-FWHDR-F4J43-972K8</Key> </ProductKey> </UserData> </component> <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SetupUILanguage> <UILanguage>en-US</UILanguage> </SetupUILanguage> <UILanguage>en-US</UILanguage> <SystemLocale>pl-PL</SystemLocale> <UserLocale>pl-PL</UserLocale> <InputLocale>0415:00001045</InputLocale> </component> </settings> </unattend> Odnośnik do komentarza
maggreg Opublikowano 24 Września 2011 Zgłoś Udostępnij Opublikowano 24 Września 2011 Omskło ci się na zmiennych, dodatkowo zmienne dla wyborów też przesunąłem, zmieniłem też katalog roboczy na bardziej pasujący do konwencji czyli "w8_unattend", spróbuj z tym: Sub W8_Inst Window.resizeTo 750,250 MENU.InnerHTML = "" DataArea.InnerHTML = "" TextArea.InnerHTML = "" On Error Resume Next Set folder = objfso.GetFolder(arrCommands(1)&"\W8_installer\w8_unattend") Set files = folder.Files For each folderIdx In files strBody52 = strBody52 & "<option value='"&folderIdx.Name&"'>"& folderIdx.Name &"</option>" Next Set colSubfolders = objWMIService.ExecQuery("Associators of {Win32_Directory.Name='"&arrCommands(1)&"\W8_installer\w8_unattend\AOems'} Where AssocClass = Win32_Subdirectory ResultRole = PartComponent") For Each objFolder in colSubfolders strBody55 = strBody55 & "<option value='"&objFolder.Name&"'>"& objFolder.FileName &"</option>" Next Set folder = objfso.GetFolder(arrCommands(1)&"\W8_installer\w8_unattend\dp") Set files = folder.Files For each folderIdx In files strBody58 = strBody58 & "<option value='"&folderIdx.Name&"'>"& folderIdx.Name &"</option>" Next str50 = "<option value='null'>null</option>" str51 = "<span style='display:inline width:60px; position:absolute; top:15%; left:5%'><select size='1' name='AvailableUnattend'>" str53 = "<input class='button' type='button' value='Potwierdź wybór' onClick='W8_Instal' style='left:25%; top:50%; width:125px;'>" str54 = "<input class='button' type='button' value='Rezygnuję' onClick='Cancel' style='left:35%; top:50%; width:125px;'>" str56 = "<span style='display:inline width:80px; position:absolute; top:30%; left:5%'><select size='1' name='AvailableAOems'>" str57 = "<span style='display:inline width:60px; position:absolute; top:60%; left:5%'><input type='checkbox' name='chkbox1' checked='True'> Autorestart</span>" str58 = "<span style='display:inline width:100px; position:absolute; top:45%; left:5%'><select size='1' name='AvailableDP'>" DataArea.InnerHTML = "<h2>Instalacja Systemu z lini Windows 8</h2>" & str51 & str50 & strBody52 & "</select>" & " Proszę wybrać plik instalacji nienadzorowanej</Span>" & str56 & str50 & strBody55 & "</select>" & " Proszę wybrać Alternatywny katalog $OEM$</Span>" & str58 & str50 & strBody58 & "</select>" & " Proszę wybrać skrypt przygotowujący dysk</Span>" & str57 & str53 & str54 End Sub Sub W8_Instal strunattend = AvailableUnattend.Value straoems = AvailableAOems.Value strdp = AvailableDP.Value if chkbox1.Checked then chkbox1_W8 = "TAK" end if MENU.InnerHTML = "" DataArea.InnerHTML = "" TextArea.InnerHTML = "" window.resizeTo 725,160 TextArea.InnerHTML = "Instalacja systemów z lini Windows 8<br>Windows 8" If strdp <> "null" Then objShell.run ("%comspec% /c" & "diskpart /s "&chr(34)&arrCommands(1)&"\W8_installer\w8_unattend\DP\"&strDP&chr(34)),0,true End If If strunattend = "null" AND straoems = "null" Then objShell.run (arrCommands(1) & "\W8_installer\setup.exe /noreboot"),0,true ElseIF strunattend <> "null" AND straoems = "null" Then objShell.run (arrCommands(1) & "\W8_installer\setup.exe /noreboot /unattend:"&arrCommands(1)&"\W8_installer\w8_unattend\"&strunattend),0,true ElseIF strunattend = "null" AND straoems <> "null" Then objShell.run (arrCommands(1) & "\W8_installer\setup.exe /noreboot /m:"&straoems),0,true Else objShell.run (arrCommands(1) & "\W8_installer\setup.exe /noreboot /m:"&straoems&" /unattend:"&arrCommands(1)&"\W8_installer\w8_unattend\"&strunattend),0,true End If IF chkbox1_W8 = "TAK" then self.close() End If window.resizeTo 1024,768 MenuSystem TextArea.InnerHTML = "" End Sub Przy okazji zauważyłem, że należy założyć obligatoryjnie katalog dp nawet jeżeli skrypty nie będą używane (katalog może być pusty) inaczej listuje katalog nadrzędny i wychodzą głupoty. pzdr Odnośnik do komentarza
fdd Opublikowano 24 Września 2011 Autor Zgłoś Udostępnij Opublikowano 24 Września 2011 1/ Jeśli mowa o strBody22, strBody25, strBody28 to w tak zwanym miedzy czasie dopatrzyłem się błędu. Na wszelki wypadek zamieniłem te 2 procedury na to co podesłałeś i zmieniłem katalog na penie na W8.... Niestety nie widać żadnego efektu. 2/ Podkatalogi na penie są - całość z oryginalnej struktury pena - konkretnie z visty 3/ Zauważyłem ze te pliki z konfiguracją instalacji nienadzorowanej widzi prawidłowe ( w W7 i W8 sa inne) jeśli wybiorę standardową instalacje bez plików xml to uruchamia sie instalka Windows 7 Pozdrawiam Odnośnik do komentarza
maggreg Opublikowano 24 Września 2011 Zgłoś Udostępnij Opublikowano 24 Września 2011 Mały błąd, nie zwróciłem uwagi wcześniej. str53 = "<input class='button' type='button' value='Potwierdź wybór' onClick='W8_Instal' style='left:25%; top:50%; width:125px;'>" Oprócz strBody miałeś jeszcze błąd w str20<>50 Jeszcze jeden błąd choć raczej bez konsekwencji - powtórzyłeś procedurę "Cancel" - nie ma takiej potrzeby. Taka mała podpowiedź na przyszłość, jeżeli nie wiesz czy dana sekcja procedury wykonuje się prawidłowo możesz ją zastąpić kodem wyświetlającym jakiś komunikat a właściwą komendę poprzedzić apostrofem, np. coś takiego: If strunattend = "null" AND straoems = "null" Then msgbox "Wykonało się" ' objShell.run (arrCommands(1) & "\W8_installer\setup.exe /noreboot"),0,true ElseIF strunattend <> "null" AND straoems = "null" Then pzdr Odnośnik do komentarza
fdd Opublikowano 24 Września 2011 Autor Zgłoś Udostępnij Opublikowano 24 Września 2011 Działa Dziękuje ślicznie i pozdrawiam. Odnośnik do komentarza
Rekomendowane odpowiedzi