Jump to content

sw2000

Member
  • Posts

    13
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

About sw2000

sw2000's Achievements

0

Reputation

  1. Thanks everyone for the responses. Its appreciated. As it turns out not having choice.exe in the WinPE boot.wim (x:system32) was causing me the trouble. Once I added it my boot process fired right up. Cluberti, I will try your code. I'm always looking to learn a new trick. I'm just curious.... was choice.exe included in WinPe 2.1 and I forgot I added it when I built the .wim or was it just omitted on WinPe 3.0? strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItems = objWMIService.ExecQuery( _ "SELECT * FROM Win32_CDROMDrive",,48) For Each objItem in colItems Wscript.Echo "CD Drive: " & objItem.Drive Next Thanks again!
  2. Here is a quick overview: I wanted Mstart.bat to run the script below and identify the drive letter that my USB device was running from and pass that value to %DRIVE% and automatically launch my main menu (menu.bat) on the USB drive. The drive letter varies from machine to machine and I wanted a semi automated process. mstart.bat @echo off cls Goto Begin :Begin ECHO FINDING BOOTABLE DRIVE FOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\WinPE_Boot_Media.txt SET DRIVE=%%i: %DRIVE%\menu.bat goto END :END On your advise I cleaned up the code a little on my menu.bat. Now when I attempt boot WinPE I do not get the immediate reboot. The main menu ( menu.bat ) stays up but the screen shakes and I have the following error message " 'choice' is not recognized as an internal or external command, operable program or batch file". I do use choice.exe for some prompts on my main menu.bat. This thread hints at my problem but no resolution. http://social.technet.microsoft.com/Forums...af-c3fd61a0feaf Do you think choice.exe might be causing the problem?
  3. Just tried it and the results are the same. I see may boot menu on the USB drive (which is what I want) for just a few seconds and then the reboot.
  4. I removed all scripting from the startnet.cmd and let WinPe boot up normally. At the X: prompt I typed mstart.bat (my batch file) and it ran and rebooted. What in the batch file causes this? @echo off cls Goto Begin :Begin ECHO FINDING BOOTABLE DRIVE FOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\WinPE_Boot_Media.txt SET DRIVE=%%i: %DRIVE%\menu.bat goto END :END
  5. Yes the code posted above is the code I use. I have also rebuildt my WinPe 3.0 and gotten the same results. It comes up, the code runs very quickly, and it reboots. I also include a modified Wimscript.ini and of course ImageX.exe. There nothing special about my boot.wim. Wimscript.ini [ExclusionList] ntfs.log hiberfil.sys pagefile.sys "System Volume Information" RECYCLER Windows\CSC [CompressionExclusionList] *.mp3 *.zip *.cab \WINDOWS\inf\*.pnf
  6. I believe it does. WinPe 3.0 works perfectly until I add the call batch file or script. It has to be my mistake. Any ideas?
  7. Hello Since I upgraded to WinPe 3.0 I have not been able to successfully use startnet.cmd to call a batch file on boot up to identify my drive letter. The small DOS like box comes up as usual and you see it runs my batch file and then it immediately reboots WinPe. This process worked fine under WinPE 2.0 and 2.1. Below are variations I have tried in my Startnet.cmd file startnet.cmd (1) wpeinit call mstart.bat startnet.cmd (2) wpeinit mstart.bat startnet.cmd (3) wpeinit @echo off cls Goto Begin :Begin ECHO FINDING BOOTABLE DRIVE FOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\WinPE_Boot_Media.txt SET DRIVE=%%i: %DRIVE%\menu.bat goto END :END Does anyone know why or what is causing WinPe to reboot after I call a batch file or running a script from Startnet.cmd. I am completely stumped ?!?!?!?!?!?! Thank you
  8. I would like to add Johan Arwidmark's latest Z-HalDetect script into my WinPe 2.01 process without having to use MDT2008 or BDD 2007. Currently I deliver our XP image from a USB drive. I'm guessing that after the image is applied and before restarting the PC I need to call a script that will check the HAL type and modify the sysprep file. What modifications are necessary to run this script after imagex has applied the image to the C partition? I would really appreciate any help. <job id="ZeroTouchInstallation"> <script language="VBScript" src="ZTIUtility.vbs"/> <script language="VBScript"> '////////////////////////////////////////////////// '// '// Script File: '// '// Z-HalDetect_standalone_version.wsf '// '// This script updates sysprep.inf with correct HAL Type '// The Reference (master) image should have an Advanced ACPI HAL type. '// '// This version does not require the MDT 2008 environement being present, '// E.g. can be used with Intel LANDesk or Altiris (Note: ZTIUtility.vbs from '// MDT 2008 must be added to the same folder) '// '// This script assumes the following files are being present in C:\Drivers\UniProcHAL '// hal.dll (Renamed from halaacpi.dll to hal.dll) '// ntkrnlpa.exe '// ntoskrnl.exe '// '// Author: Johan Arwidmark '// URL: [url="http://www.deployvista.com"]http://www.deployvista.com[/url] '// '// Disclaimer '// This script is provided "AS IS" without express '// or implied warranty of any kind. '// '////////////////////////////////////////////////// ' Customize the local sysprep.inf file based on the HAL type Call UpdateSysprepinf () ' Done, quit. WScript.Quit Sub UpdateSysprepinf () ' Set Sysprep Path If oFSO.FileExists("C:\sysprep\Sysprep.inf") then sSysprepInf = "C:\sysprep\Sysprep.inf" oLogging.CreateEntry "Found sysprep in " & sSysprepInf, LogTypeInfo Else oLogging.CreateEntry "Could not locate Sysprep", LogTypeWarning End if ' Find out the HAL type sHalType = oShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Enum\Root\ACPI_HAL\0000\HardwareID") If sHalType(0) = "acpiapic" Then if oShell.Environment.item("NUMBER_OF_PROCESSORS") = 1 then WriteIni sSysprepInf, "Unattended", "UpdateUPHAL", "ACPIAPIC_UP,C:\Windows\Inf\Hal.inf" oLogging.CreateEntry "HAL Type is ACPIAPIC_UP, updating sysprep.inf", LogTypeInfo Call CopyHalFiles() else writeini sSysprepInf, "Unattended", "UpdateHAL", "ACPIAPIC_MP,C:\Windows\Inf\Hal.inf" oLogging.CreateEntry "HAL Type is ACPIAPIC_MP, updating sysprep.inf", LogTypeInfo Call CopyHalFiles() end if ElseIf sHalType(0) = "acpiapic_up" Then WriteIni sSysprepInf, "Unattended", "UpdateUPHAL", "ACPIAPIC_UP,C:\Windows\Inf\Hal.inf" oLogging.CreateEntry "HAL Type is ACPIAPIC_UP, updating sysprep.inf", LogTypeInfo Call CopyHalFiles() ElseIf sHalType(0) = "acpiapic_mp" Then writeini sSysprepInf, "Unattended", "UpdateHAL", "ACPIAPIC_MP,C:\Windows\Inf\Hal.inf" oLogging.CreateEntry "HAL Type is ACPIAPIC_MP, updating sysprep.inf", LogTypeInfo Call CopyHalFiles() Else oLogging.CreateEntry "HAL Type is ACPIPIC, Do nothing", LogTypeInfo End if End Sub Sub CopyHalFiles() sSourceFolder = "C:\Drivers\UniProcHAL" sDestinationFolder = "C:\Windows\System32" oLogging.CreateEntry "Checking for" & sSourceFolder, LogTypeInfo If oFSO.FolderExists(sSourceFolder) then oLogging.CreateEntry "Folder " & sSourceFolder & " Found", LogTypeInfo oLogging.CreateEntry "Copying HAL files for UniProc and MultiProc Comatibility", LogTypeInfo For Each sFile In oFSO.GetFolder(sSourceFolder).Files oFSO.GetFile(sFile).Copy sDestinationFolder & "\" & oFSO.GetFileName(sFile),True oLogging.CreateEntry "Copying " & oFSO.GetFileName(sFile) & " to " & sDestinationFolder, LogTypeInfo Next Else oLogging.CreateEntry "Error - Folder " & sSourceFolder & " Not Found", LogTypeError oLogging.CreateEntry "Error - Copying HAL files for UniProc and MultiProc Comatibility Failed ", LogTypeError CopyHalFiles = Failure Exit Sub End If End Sub Function ReadIni(file, section, item) ReadIni = "" file = Trim(file) item = Trim(item) Set ini = oFSO.OpenTextFile( file, 1, True) Do While ini.AtEndOfStream = False line = ini.ReadLine line = Trim(line) If LCase(line) = "[" & LCase(section) & "]" Then line = ini.ReadLine line = Trim(line) Do While Left( line, 1) <> "[" 'If InStr( 1, line, item & "=", 1) = 1 Then equalpos = InStr(1, line, "=", 1 ) If equalpos > 0 Then leftstring = Left(line, equalpos - 1 ) leftstring = Trim(leftstring) If LCase(leftstring) = LCase(item) Then ReadIni = Mid( line, equalpos + 1 ) ReadIni = Trim(ReadIni) Exit Do End If End If If ini.AtEndOfStream Then Exit Do line = ini.ReadLine line = Trim(line) Loop Exit Do End If Loop ini.Close End Function Sub WriteIni( file, section, item, myvalue ) in_section = False section_exists = False item_exists = ( ReadIni( file, section, item ) <> "" ) wrote = False file = Trim(file) itemtrimmed = Trim(item) myvalue = Trim(myvalue) temp_ini = oFSO.GetParentFolderName(file) & "\" & oFSO.GetTempName Set read_ini = oFSO.OpenTextFile( file, 1, True, TristateFalse ) Set write_ini = oFSO.CreateTextFile( temp_ini, False) While read_ini.AtEndOfStream = False line = read_ini.ReadLine linetrimmed = Trim(line) If wrote = False Then If LCase(line) = "[" & LCase(section) & "]" Then section_exists = True in_section = True ElseIf InStr( line, "[" ) = 1 Then in_section = False End If End If If in_section Then If item_exists = False Then write_ini.WriteLine line write_ini.WriteLine item & "=" & myvalue wrote = True in_section = False Else equalpos = InStr(1, line, "=", 1 ) If equalpos > 0 Then leftstring = Left(line, equalpos - 1 ) leftstring = Trim(leftstring) If LCase(leftstring) = LCase(item) Then write_ini.WriteLine itemtrimmed & "=" & myvalue wrote = True in_section = False End If End If If Not wrote Then write_ini.WriteLine line End If End If Else write_ini.WriteLine line End If Wend If section_exists = False Then ' section doesn't exist write_ini.WriteLine write_ini.WriteLine "[" & section & "]" write_ini.WriteLine itemtrimmed & "=" & myvalue End If read_ini.Close write_ini.Close If oFSO.FileExists(file) then oFSO.DeleteFile file, True End if oFSO.CopyFile temp_ini, file, true oFSO.DeleteFile temp_ini, True End Sub </script> </job>
  9. I would like to add Johan Arwidmark's latest Z-HalDetect script into my WinPe 2.01 process without having to use MDT2008 or BDD 2007. Currently I deliver our XP image from a USB drive. I'm guessing that after the image is applied and before restarting the PC I need to call a script that will check the HAL type and modify the sysprep file. What modifications are necessary to run this script after imagex has applied the image to the C partition? I would really appreciate any help. <job id="ZeroTouchInstallation"> <script language="VBScript" src="ZTIUtility.vbs"/> <script language="VBScript"> '////////////////////////////////////////////////// '// '// Script File: '// '// Z-HalDetect_standalone_version.wsf '// '// This script updates sysprep.inf with correct HAL Type '// The Reference (master) image should have an Advanced ACPI HAL type. '// '// This version does not require the MDT 2008 environement being present, '// E.g. can be used with Intel LANDesk or Altiris (Note: ZTIUtility.vbs from '// MDT 2008 must be added to the same folder) '// '// This script assumes the following files are being present in C:\Drivers\UniProcHAL '// hal.dll (Renamed from halaacpi.dll to hal.dll) '// ntkrnlpa.exe '// ntoskrnl.exe '// '// Author: Johan Arwidmark '// URL: [url="http://www.deployvista.com"]http://www.deployvista.com[/url] '// '// Disclaimer '// This script is provided "AS IS" without express '// or implied warranty of any kind. '// '////////////////////////////////////////////////// ' Customize the local sysprep.inf file based on the HAL type Call UpdateSysprepinf () ' Done, quit. WScript.Quit Sub UpdateSysprepinf () ' Set Sysprep Path If oFSO.FileExists("C:\sysprep\Sysprep.inf") then sSysprepInf = "C:\sysprep\Sysprep.inf" oLogging.CreateEntry "Found sysprep in " & sSysprepInf, LogTypeInfo Else oLogging.CreateEntry "Could not locate Sysprep", LogTypeWarning End if ' Find out the HAL type sHalType = oShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Enum\Root\ACPI_HAL\0000\HardwareID") If sHalType(0) = "acpiapic" Then if oShell.Environment.item("NUMBER_OF_PROCESSORS") = 1 then WriteIni sSysprepInf, "Unattended", "UpdateUPHAL", "ACPIAPIC_UP,C:\Windows\Inf\Hal.inf" oLogging.CreateEntry "HAL Type is ACPIAPIC_UP, updating sysprep.inf", LogTypeInfo Call CopyHalFiles() else writeini sSysprepInf, "Unattended", "UpdateHAL", "ACPIAPIC_MP,C:\Windows\Inf\Hal.inf" oLogging.CreateEntry "HAL Type is ACPIAPIC_MP, updating sysprep.inf", LogTypeInfo Call CopyHalFiles() end if ElseIf sHalType(0) = "acpiapic_up" Then WriteIni sSysprepInf, "Unattended", "UpdateUPHAL", "ACPIAPIC_UP,C:\Windows\Inf\Hal.inf" oLogging.CreateEntry "HAL Type is ACPIAPIC_UP, updating sysprep.inf", LogTypeInfo Call CopyHalFiles() ElseIf sHalType(0) = "acpiapic_mp" Then writeini sSysprepInf, "Unattended", "UpdateHAL", "ACPIAPIC_MP,C:\Windows\Inf\Hal.inf" oLogging.CreateEntry "HAL Type is ACPIAPIC_MP, updating sysprep.inf", LogTypeInfo Call CopyHalFiles() Else oLogging.CreateEntry "HAL Type is ACPIPIC, Do nothing", LogTypeInfo End if End Sub Sub CopyHalFiles() sSourceFolder = "C:\Drivers\UniProcHAL" sDestinationFolder = "C:\Windows\System32" oLogging.CreateEntry "Checking for" & sSourceFolder, LogTypeInfo If oFSO.FolderExists(sSourceFolder) then oLogging.CreateEntry "Folder " & sSourceFolder & " Found", LogTypeInfo oLogging.CreateEntry "Copying HAL files for UniProc and MultiProc Comatibility", LogTypeInfo For Each sFile In oFSO.GetFolder(sSourceFolder).Files oFSO.GetFile(sFile).Copy sDestinationFolder & "\" & oFSO.GetFileName(sFile),True oLogging.CreateEntry "Copying " & oFSO.GetFileName(sFile) & " to " & sDestinationFolder, LogTypeInfo Next Else oLogging.CreateEntry "Error - Folder " & sSourceFolder & " Not Found", LogTypeError oLogging.CreateEntry "Error - Copying HAL files for UniProc and MultiProc Comatibility Failed ", LogTypeError CopyHalFiles = Failure Exit Sub End If End Sub Function ReadIni(file, section, item) ReadIni = "" file = Trim(file) item = Trim(item) Set ini = oFSO.OpenTextFile( file, 1, True) Do While ini.AtEndOfStream = False line = ini.ReadLine line = Trim(line) If LCase(line) = "[" & LCase(section) & "]" Then line = ini.ReadLine line = Trim(line) Do While Left( line, 1) <> "[" 'If InStr( 1, line, item & "=", 1) = 1 Then equalpos = InStr(1, line, "=", 1 ) If equalpos > 0 Then leftstring = Left(line, equalpos - 1 ) leftstring = Trim(leftstring) If LCase(leftstring) = LCase(item) Then ReadIni = Mid( line, equalpos + 1 ) ReadIni = Trim(ReadIni) Exit Do End If End If If ini.AtEndOfStream Then Exit Do line = ini.ReadLine line = Trim(line) Loop Exit Do End If Loop ini.Close End Function Sub WriteIni( file, section, item, myvalue ) in_section = False section_exists = False item_exists = ( ReadIni( file, section, item ) <> "" ) wrote = False file = Trim(file) itemtrimmed = Trim(item) myvalue = Trim(myvalue) temp_ini = oFSO.GetParentFolderName(file) & "\" & oFSO.GetTempName Set read_ini = oFSO.OpenTextFile( file, 1, True, TristateFalse ) Set write_ini = oFSO.CreateTextFile( temp_ini, False) While read_ini.AtEndOfStream = False line = read_ini.ReadLine linetrimmed = Trim(line) If wrote = False Then If LCase(line) = "[" & LCase(section) & "]" Then section_exists = True in_section = True ElseIf InStr( line, "[" ) = 1 Then in_section = False End If End If If in_section Then If item_exists = False Then write_ini.WriteLine line write_ini.WriteLine item & "=" & myvalue wrote = True in_section = False Else equalpos = InStr(1, line, "=", 1 ) If equalpos > 0 Then leftstring = Left(line, equalpos - 1 ) leftstring = Trim(leftstring) If LCase(leftstring) = LCase(item) Then write_ini.WriteLine itemtrimmed & "=" & myvalue wrote = True in_section = False End If End If If Not wrote Then write_ini.WriteLine line End If End If Else write_ini.WriteLine line End If Wend If section_exists = False Then ' section doesn't exist write_ini.WriteLine write_ini.WriteLine "[" & section & "]" write_ini.WriteLine itemtrimmed & "=" & myvalue End If read_ini.Close write_ini.Close If oFSO.FileExists(file) then oFSO.DeleteFile file, True End if oFSO.CopyFile temp_ini, file, true oFSO.DeleteFile temp_ini, True End Sub </script> </job>
  10. I would like to add Johan Arwidmark's latest Z-HalDetect script into my WinPe 2.01 process without having to use MDT2008 or BDD 2007. Currently I deliver our XP image from a USB drive. I'm guessing that after the image is applied and before restarting the PC I need to call a script that will check the HAL type and modify the sysprep file. What modifications are necessary to run this script after imagex has applied the image to the C partition? I would really appreciate any help. <job id="ZeroTouchInstallation"> <script language="VBScript" src="ZTIUtility.vbs"/> <script language="VBScript"> '////////////////////////////////////////////////// '// '// Script File: '// '// Z-HalDetect_standalone_version.wsf '// '// This script updates sysprep.inf with correct HAL Type '// The Reference (master) image should have an Advanced ACPI HAL type. '// '// This version does not require the MDT 2008 environement being present, '// E.g. can be used with Intel LANDesk or Altiris (Note: ZTIUtility.vbs from '// MDT 2008 must be added to the same folder) '// '// This script assumes the following files are being present in C:\Drivers\UniProcHAL '// hal.dll (Renamed from halaacpi.dll to hal.dll) '// ntkrnlpa.exe '// ntoskrnl.exe '// '// Author: Johan Arwidmark '// URL: [url="http://www.deployvista.com"]http://www.deployvista.com[/url] '// '// Disclaimer '// This script is provided "AS IS" without express '// or implied warranty of any kind. '// '////////////////////////////////////////////////// ' Customize the local sysprep.inf file based on the HAL type Call UpdateSysprepinf () ' Done, quit. WScript.Quit Sub UpdateSysprepinf () ' Set Sysprep Path If oFSO.FileExists("C:\sysprep\Sysprep.inf") then sSysprepInf = "C:\sysprep\Sysprep.inf" oLogging.CreateEntry "Found sysprep in " & sSysprepInf, LogTypeInfo Else oLogging.CreateEntry "Could not locate Sysprep", LogTypeWarning End if ' Find out the HAL type sHalType = oShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Enum\Root\ACPI_HAL\0000\HardwareID") If sHalType(0) = "acpiapic" Then if oShell.Environment.item("NUMBER_OF_PROCESSORS") = 1 then WriteIni sSysprepInf, "Unattended", "UpdateUPHAL", "ACPIAPIC_UP,C:\Windows\Inf\Hal.inf" oLogging.CreateEntry "HAL Type is ACPIAPIC_UP, updating sysprep.inf", LogTypeInfo Call CopyHalFiles() else writeini sSysprepInf, "Unattended", "UpdateHAL", "ACPIAPIC_MP,C:\Windows\Inf\Hal.inf" oLogging.CreateEntry "HAL Type is ACPIAPIC_MP, updating sysprep.inf", LogTypeInfo Call CopyHalFiles() end if ElseIf sHalType(0) = "acpiapic_up" Then WriteIni sSysprepInf, "Unattended", "UpdateUPHAL", "ACPIAPIC_UP,C:\Windows\Inf\Hal.inf" oLogging.CreateEntry "HAL Type is ACPIAPIC_UP, updating sysprep.inf", LogTypeInfo Call CopyHalFiles() ElseIf sHalType(0) = "acpiapic_mp" Then writeini sSysprepInf, "Unattended", "UpdateHAL", "ACPIAPIC_MP,C:\Windows\Inf\Hal.inf" oLogging.CreateEntry "HAL Type is ACPIAPIC_MP, updating sysprep.inf", LogTypeInfo Call CopyHalFiles() Else oLogging.CreateEntry "HAL Type is ACPIPIC, Do nothing", LogTypeInfo End if End Sub Sub CopyHalFiles() sSourceFolder = "C:\Drivers\UniProcHAL" sDestinationFolder = "C:\Windows\System32" oLogging.CreateEntry "Checking for" & sSourceFolder, LogTypeInfo If oFSO.FolderExists(sSourceFolder) then oLogging.CreateEntry "Folder " & sSourceFolder & " Found", LogTypeInfo oLogging.CreateEntry "Copying HAL files for UniProc and MultiProc Comatibility", LogTypeInfo For Each sFile In oFSO.GetFolder(sSourceFolder).Files oFSO.GetFile(sFile).Copy sDestinationFolder & "\" & oFSO.GetFileName(sFile),True oLogging.CreateEntry "Copying " & oFSO.GetFileName(sFile) & " to " & sDestinationFolder, LogTypeInfo Next Else oLogging.CreateEntry "Error - Folder " & sSourceFolder & " Not Found", LogTypeError oLogging.CreateEntry "Error - Copying HAL files for UniProc and MultiProc Comatibility Failed ", LogTypeError CopyHalFiles = Failure Exit Sub End If End Sub Function ReadIni(file, section, item) ReadIni = "" file = Trim(file) item = Trim(item) Set ini = oFSO.OpenTextFile( file, 1, True) Do While ini.AtEndOfStream = False line = ini.ReadLine line = Trim(line) If LCase(line) = "[" & LCase(section) & "]" Then line = ini.ReadLine line = Trim(line) Do While Left( line, 1) <> "[" 'If InStr( 1, line, item & "=", 1) = 1 Then equalpos = InStr(1, line, "=", 1 ) If equalpos > 0 Then leftstring = Left(line, equalpos - 1 ) leftstring = Trim(leftstring) If LCase(leftstring) = LCase(item) Then ReadIni = Mid( line, equalpos + 1 ) ReadIni = Trim(ReadIni) Exit Do End If End If If ini.AtEndOfStream Then Exit Do line = ini.ReadLine line = Trim(line) Loop Exit Do End If Loop ini.Close End Function Sub WriteIni( file, section, item, myvalue ) in_section = False section_exists = False item_exists = ( ReadIni( file, section, item ) <> "" ) wrote = False file = Trim(file) itemtrimmed = Trim(item) myvalue = Trim(myvalue) temp_ini = oFSO.GetParentFolderName(file) & "\" & oFSO.GetTempName Set read_ini = oFSO.OpenTextFile( file, 1, True, TristateFalse ) Set write_ini = oFSO.CreateTextFile( temp_ini, False) While read_ini.AtEndOfStream = False line = read_ini.ReadLine linetrimmed = Trim(line) If wrote = False Then If LCase(line) = "[" & LCase(section) & "]" Then section_exists = True in_section = True ElseIf InStr( line, "[" ) = 1 Then in_section = False End If End If If in_section Then If item_exists = False Then write_ini.WriteLine line write_ini.WriteLine item & "=" & myvalue wrote = True in_section = False Else equalpos = InStr(1, line, "=", 1 ) If equalpos > 0 Then leftstring = Left(line, equalpos - 1 ) leftstring = Trim(leftstring) If LCase(leftstring) = LCase(item) Then write_ini.WriteLine itemtrimmed & "=" & myvalue wrote = True in_section = False End If End If If Not wrote Then write_ini.WriteLine line End If End If Else write_ini.WriteLine line End If Wend If section_exists = False Then ' section doesn't exist write_ini.WriteLine write_ini.WriteLine "[" & section & "]" write_ini.WriteLine itemtrimmed & "=" & myvalue End If read_ini.Close write_ini.Close If oFSO.FileExists(file) then oFSO.DeleteFile file, True End if oFSO.CopyFile temp_ini, file, true oFSO.DeleteFile temp_ini, True End Sub </script> </job>
  11. Today I customized the Windows administrator account instead of using the profile I created to be my model default profile. I ran sysprep and it worked. Any idea why CopyProfile would work for the admin account and not my other account. I thought the only thing you needed to do to have the CopyProfile work in Vista sysprep was be logged in as the profile you want to copy when sysprep is run. Ideas?
  12. I have been working on developing a sysprepped Vista Business image for about two months. I'm not doing anything real fancy at this point other then the network (Work, Home, Other) registry hack and moving the Users folder onto a D: partition on the same drive. I use imageX and Windows PE for capturing images. I have maintained an unsysprepped image for the endless list of customizations to the working profile I want sysprep to copy it to the default when I sysprep the image. Everything was working fine for about a month. Know since I updated the unsysprepped with a few small applications everytime I run sysprep everything appears to be fine. No errors. The image comes up and appears to be in perfect working order. But my default profile is empty and all my cutomizations do not populate when a new user creates a profile. I'm completely stumped. Is it bad to move the User folder to D:? I have read its a questionable practice. I have also ever been able to get DoNotCleanTaskbar to work either. I would like it to not touch the task bar but it cleans it everytime. Its not in the code below because I gave up on it working. Small issue. Thanks in advance! <?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="generalize"> <component name="Microsoft-Windows-Security-Licensing-SLC" 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"> <SkipRearm>1</SkipRearm> </component> <component name="Microsoft-Windows-PnpSysprep" 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"> <PersistAllDeviceInstalls>true</PersistAllDeviceInstalls> </component> </settings> <settings pass="specialize"> <component name="Microsoft-Windows-Deployment" 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"> <RunSynchronous> <RunSynchronousCommand wcm:action="add"> <Path>net user administrator /active:yes</Path> <Order>1</Order> </RunSynchronousCommand> <RunSynchronousCommand wcm:action="add"> <Path>reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 00000000 /f</Path> <Order>2</Order> </RunSynchronousCommand> </RunSynchronous> </component> <component name="Microsoft-Windows-Shell-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"> <CopyProfile>true</CopyProfile> <ShowWindowsLive>false</ShowWindowsLive> <TimeZone>Central Standard Time</TimeZone> <Display> <ColorDepth>32</ColorDepth> <DPI>96</DPI> <HorizontalResolution>1024</HorizontalResolution> <RefreshRate>60</RefreshRate> <VerticalResolution>768</VerticalResolution> </Display> </component> <component name="Microsoft-Windows-Security-Licensing-SLC-UX" 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"> <SkipAutoActivation>true</SkipAutoActivation> </component> </settings> <settings pass="oobeSystem"> <component name="Microsoft-Windows-International-Core" 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"> <InputLocale>en-us</InputLocale> <SystemLocale>en-us</SystemLocale> <UILanguage>en-us</UILanguage> <UserLocale>en-us</UserLocale> </component> <component name="Microsoft-Windows-Shell-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"> <OOBE> <HideEULAPage>true</HideEULAPage> <NetworkLocation>Work</NetworkLocation> <ProtectYourPC>2</ProtectYourPC> <SkipUserOOBE>true</SkipUserOOBE> </OOBE> <UserAccounts> <AdministratorPassword> <Value>QwBvAG0AbQBvAG4AMQBBAGQAbQBpAG4AaQBzAHQAcgBhAHQAbwByAFAAYQBzAHMAdwBvAHIAZAA=</Value> <PlainText>false</PlainText> </AdministratorPassword> <LocalAccounts> <LocalAccount wcm:action="add"> <Password> <Value>RAB1AGMAawBzADIAMAAwADcAUABhAHMAcwB3AG8AcgBkAA==</Value> <PlainText>false</PlainText> </Password> <Description>Local Account</Description> <Name>DLAdmin</Name> <Group>Administrators</Group> </LocalAccount> </LocalAccounts> </UserAccounts> <RegisteredOrganization>Our Organization</RegisteredOrganization> <RegisteredOwner>Our Organization</RegisteredOwner> <FolderLocations> <ProfilesDirectory>D:\Users</ProfilesDirectory> </FolderLocations> </component> </settings> <cpi:offlineImage cpi:source="wim:c:/users/user/desktop/install.wim#Windows Vista BUSINESS" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> </unattend>
  13. Greetings I had hoped to create a imaging process that would do the following. Below is an overview. Is what I am attempting below possible? 1. Insert my own customized bootable Vista DVD with sysprepped image. 2. Automatically wipe the Drive of the PC 3. Create Partitions C: and D: on drive 4. Install my previously customized and now sysprepped Vista Business Sp1 image. I have successfully created a image that will boot up after sysprep and is very close to what I want. Now I just really need help putting it all together on a bootable DVD. Do I combine my 2 .xml files? Do I have pieces in Sysprep.xml that should be in the unattend.xml or vice versa? Please look at my unattend.xml and my sysprep.xml. Any and all recommendations would be greatly appreciated. 1. (unattend.xml) <?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urnchemas-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"> <DiskConfiguration> <Disk wcm:action="add"> <CreatePartitions> <CreatePartition wcm:action="add"> <Order>2</Order> <Extend>true</Extend> <Type>Extended</Type> </CreatePartition> <CreatePartition wcm:action="add"> <Order>1</Order> <Size>70000</Size> <Type>Primary</Type> </CreatePartition> <CreatePartition wcm:action="add"> <Order>3</Order> <Extend>true</Extend> <Type>Logical</Type> </CreatePartition> </CreatePartitions> <ModifyPartitions> <ModifyPartition wcm:action="add"> <Order>2</Order> <Active>false</Active> <Extend>false</Extend> <Format>NTFS</Format> <Label>DATA</Label> <Letter>D</Letter> <PartitionID>2</PartitionID> </ModifyPartition> <ModifyPartition wcm:action="add"> <Order>1</Order> <Active>true</Active> <Format>NTFS</Format> <Label>OS_Install</Label> <PartitionID>1</PartitionID> <Extend>false</Extend> <Letter>C</Letter> </ModifyPartition> </ModifyPartitions> <DiskID>0</DiskID> <WillWipeDisk>true</WillWipeDisk> </Disk> </DiskConfiguration> <ImageInstall> <OSImage> <InstallFrom> <MetaData wcm:action="add"> <Key>/IMAGE/INDEX</Key> <Value>1</Value> </MetaData> </InstallFrom> <InstallTo> <DiskID>0</DiskID> <PartitionID>1</PartitionID> </InstallTo> <InstallToAvailablePartition>false</InstallToAvailablePartition> <WillShowUI>OnError</WillShowUI> </OSImage> </ImageInstall> <UserData> <ProductKey> <WillShowUI>OnError</WillShowUI> <Key>XXXXXXXXXXXXXXXXXXXXXX</Key> </ProductKey> <AcceptEula>true</AcceptEula> <Organization>MyBusiness</Organization> <FullName>MyBusiness</FullName> </UserData> </component> </settings> <settings pass="generalize"> <component name="Microsoft-Windows-PnpSysprep" 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"> <PersistAllDeviceInstalls>true</PersistAllDeviceInstalls> </component> </settings> <cpifflineImage cpiource="wim:c:/888/888/desktop/install.wim#Windows Vista BUSINESS" xmlns:cpi="urnchemas-microsoft-com:cpi" /> </unattend> 2. (sysprep.xml) <?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urnchemas-microsoft-com:unattend"> <settings pass="generalize"> <component name="Microsoft-Windows-Security-Licensing-SLC" 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"> <SkipRearm>1</SkipRearm> </component> </settings> <settings pass="specialize"> <component name="Microsoft-Windows-Deployment" 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"> <RunSynchronous> <RunSynchronousCommand wcm:action="add"> <Path>net user administrator /active:yes </Path> <Order>2</Order> </RunSynchronousCommand> <RunSynchronousCommand wcm:action="add"> <Path>reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 00000000 /f</Path> <Order>1</Order> </RunSynchronousCommand> </RunSynchronous> </component> <component name="Microsoft-Windows-Shell-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"> <CopyProfile>true</CopyProfile> <ProductKey></ProductKey> <ShowWindowsLive>false</ShowWindowsLive> <TimeZone>Central Standard Time</TimeZone> <Display> <ColorDepth>32</ColorDepth> <DPI>96</DPI> <HorizontalResolution>1024</HorizontalResolution> <VerticalResolution>768</VerticalResolution> </Display> </component> </settings> <settings pass="oobeSystem"> <component name="Microsoft-Windows-International-Core" 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"> <InputLocale>en-us</InputLocale> <SystemLocale>en-us</SystemLocale> <UILanguage>en-us</UILanguage> <UserLocale>en-us</UserLocale> </component> <component name="Microsoft-Windows-Shell-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"> <OOBE> <HideEULAPage>true</HideEULAPage> <NetworkLocation>Work</NetworkLocation> <ProtectYourPC>2</ProtectYourPC> <SkipUserOOBE>true</SkipUserOOBE> </OOBE> <UserAccounts> <AdministratorPassword> <Value>QwBvAG0AbQBvAG4AMQBBAGQAbQBpAG4AaQBzAHQAcgBhAHQAbwByAFAAYQBzAHMAdwBvAHIAZAA=</Value> <PlainText>false</PlainText> </AdministratorPassword> <LocalAccounts> <LocalAccount wcm:action="add"> <Password> <Value>RAB1AGMAawBzADIAMAAwADcAUABhAHMAcwB3AG8AcgBkAA==</Value> <PlainText>false</PlainText> </Password> <Description>Local Account</Description> <Name>MYAdmin</Name> <Group>Administrators</Group> <DisplayName></DisplayName> </LocalAccount> </LocalAccounts> </UserAccounts> <RegisteredOrganization>Microsoft</RegisteredOrganization> <RegisteredOwner>AutoBVT</RegisteredOwner> </component> </settings> <cpifflineImage cpiource="wim:c:/users/55555/desktop/install.wim#Windows Vista BUSINESS" xmlns:cpi="urnchemas-microsoft-com:cpi" /> </unattend> Thank you in advance
×
×
  • Create New...