Jump to content

randalldale

Member
  • Posts

    115
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Posts posted by randalldale

  1. Hi Guys,

    First thanks again for all the help you have provided and continue to provide. Now onto the reason I'm writing this request.

    I do some imaging for my company and in recent releases I would build my unattend.txt and sysprep.inf files dynamically, (on the fly), that way anyone could install the OS. They only had to answer questions and then the vbscript I built would create the file needed using the inputed data such as users name, serial number of PC used for PC name, asset tag information, also languages required and location along with time zone. This way I could use some WMI scripting and determine the serial number and system ID then use them alog with the typed information as needed for the OS install.

    Now I still have all that code and also have created a dynamic unattend.xml coding. What I would like to know is has anyone done this sort of installation?

    If so, where do you copy the unattend.xml to when you apply the .WIM image? c:\Windows\System32\Sysprep\?

    How do you add applications say for a runonceEX or a GUIrunonce? Is there such a file now? Got to admit the Windows System Image Manager is pretty confusing, especially since I upgraded to v1.1 and it no longer runs.

    That should generate enough emails for the moment.

    Thanks again for the help,

    Randy

  2. Ok guys, the link from cluberti was actually correct.

    http://social.technet.microsoft.com/forums...1-5df58d846bff/

    If you make a .CMD file and add it to your BOOT.WIM for winpe with the following lines you can lay the image back down on the same PC after running diskpart.exe clean...

    ************************************

    echo Fixing boot files...

    c:

    bcdedit /set {default} device partition=c:

    bcdedit /set {default} osdevice partition=c:

    bcdedit /set {bootmgr} device partition=c:

    bcdedit /set {ntldr} device partition=c:

    ************************************

    I saved this file as vpartfix.cmd and placed it in the BOOT.WIM system32 folder.

    If you only format the HDD and not clean it then you can just apply the image back down without a problem.

    I just checked both senerios and both worked fine.

    If you want an easy format here is what I built that works fine.

    *******************************************

    REM Disk format script

    REM This script will format partition 1 on Disk 0

    Select Disk 0

    select Part 1

    Format Quick FS=NTFS

    exit

    *******************************************

    Name it whatever you like I called mine vdisk.txt now you can call it with diskpart.exe

    diskpart.exe /s vdisk.txt

    Now regardless of whatever I'm needing to go back to the call tags are built into my BOOT.WIM

    Lastly everyone needs to remember that this only works on the same PC when doing image builds to give you an index you can drop back to if needed. If you want to lay the image down on different hardware you will need to sysprep.

    Thanks for the help guys,

    Randy

  3. Dim,

    I have just started down the Vista path myself but am familar with the .wim structure.

    What you can look at is creating your driver injection into a wim file containing multiple index's i.e. appended drivers.wim. As I have done with my XP installs.

    Since Vista is .WIM based and basically a sysprep'd image when you lay down the install.wim you can also then by index lay down the driver.wim pertaining to the PC that you are trying to install on.

    As long as you are using WinPE to boot you can use a WMI script to determine the PC and then apply the correct drivers.wim index.

    Here is a script I use to determine the PC based on Manufacturer System ID.

    ***********************************************************************************

    On Error Resume Next

    Dim objWMIService, colItems, objItem, sLen

    Const wbemFlagReturnImmediately = &h10

    Const wbemFlagForwardOnly = &h20

    Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2")

    Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_BaseBoard", "WQL", _

    wbemFlagReturnImmediately + wbemFlagForwardOnly)

    '-------------------------------------------------------------------------

    ' Getting the SYSID of the PC

    '-------------------------------------------------------------------------

    For Each objItem In colItems

    SYSID=trim(objitem.Product)

    ' Remove "h" from SYSID string as some PCs have an h and some don't

    sLen=Len(SYSID)

    If Ucase(Mid(SYSID,sLen,1)) = "H" Then

    SYSID=Mid(SYSID,1,sLen-1)

    End If

    Next

    MsgBox SYSID

    ***********************************************************************************

    If you don't care about the 'h' character then change the scripting to just grab the SYSID.

    I hope this helps,

    Randy

  4. Hi Guys,

    I must have missed something and would like someone to clue me in.

    I have Vista SP1 that I'm capturing at different spots for image creation and each time I try to apply the image it gets an error.

    0xc000000e

    File: Windows\System32\winload.exe

    The file is missing or corrupt.

    Not sure what I missed, I did switch to WAIK 1.2 for Vista SP1 but still get the errors. I did try bcdedit.exe but it seems to fail on anything short of /?

    When I capture this is the line I use....

    imagex /capture /boot /compress maximum c: c:\vistasp1.wim "Base vista sp1 image" /verify

    Thanks for your help...

  5. Of course you can always try an export to see if you can cut it down.

    imagex /export /boot /compress maximum d:\sources\install.wim 3 c:\business.wim "Add some text to make it work."

    (3 being the number of the image you want.)

    Not really that hard.

  6. GunSmokingMan thanks the coding but I'm enough of a NOOB that I can't figure out how to integrate it into my system.

    I've gotten my code to work .... well sort of :whistle: It seems to only want to run 2 subdirectories and at some point it does get an error "line 120, char 6, error, could not complete the operation due to error 80041017, code 0"

    Line 120 is

    Set colSubfolders2 = objWMIService.ExecQuery("Associators of {Win32_Directory.Name='" & strFolderName & "'} " & "Where AssocClass = Win32_Subdirectory " & "ResultRole = PartComponent")

    it appears to be one of the directories but haven't figured out which yet.

    I added some err capture but haven't been having much success with it.

    If you can figrue out how to integrate your coding so that it is using the array I'm building because it is a dyanmic array that would be great!

    I've attached my code.

    	<script LANGUAGE="vbscript">
    On Error Resume Next
    Dim SYSID, ColDrv, Fso, objWShell, intSize
    Dim strPath, strDate
    Dim aryDirectories()
    Dim aryDirectories2()
    Function Window_OnLoad()
    'finds the next available drive letter
    Dim Drv, StrDrv
    intSize = 0
    Set objDictionary = CreateObject("Scripting.Dictionary")
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set colDisks = objWMIService.ExecQuery("Select * from Win32_LogicalDisk")
    For Each objDisk in colDisks
    objDictionary.Add objDisk.DeviceID, objDisk.DeviceID
    Next
    For i = 67 to 90
    strDrive = Chr(i) & ":"
    If objDictionary.Exists(strDrive) Then
    Else
    ColDrv = strDrive
    Exit For
    End If
    Next
    IntSize = intSize + 1
    ReDim Preserve aryDirectories(intSize)
    ReDim Preserve aryDirectories2(intSize)
    aryDirectories(intSize) = UCase ("C:\Documents and Settings")
    aryDirectories2(intSize) = UCase ("Documents and Settings")
    intSize = intSize + 1
    ReDim Preserve aryDirectories(intSize)
    ReDim Preserve aryDirectories2(intSize)
    aryDirectories(intSize) = UCase ("C:\DATA")
    aryDirectories2(intSize) = UCase ("DATA")
    IntSize = intSize + 1
    ReDim Preserve aryDirectories(intSize)
    ReDim Preserve aryDirectories2(intSize)
    aryDirectories(intSize) = UCase ("C:\MyBackup")
    aryDirectories2(intSize) = UCase ("MyBackup")
    MsgBox "If the USB Hard drive was already plugged in you need to select exit and start over otherwise you may now plug in your USB Hard Drive and press 'OK'"
    End Function
    Sub GetSubFolders(strFolderName)
    On Error Resume Next
    Dim strErrFile, objErrFile, strLogFile, objLogFile
    strErrFile = "c:\ErrLog.txt"
    strLogFile = "c:\CopyLog.txt"
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objErrFile = objFSO.CreateTextFile(strErrFile)
    Set objLogFile = objFSO.CreateTextFile(strLogFile)
    Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
    Set colSubfolders2 = objWMIService.ExecQuery _
    ("Associators of {Win32_Directory.Name='" & strFolderName & "'} " _
    & "Where AssocClass = Win32_Subdirectory " _
    & "ResultRole = PartComponent")
    If Err.Number <> 0 Then
    objErrFile.WriteLine" " & Err.Description & " " & Err.Number & " " & Err.HelpContext
    Err.Clear
    Else
    For Each objFolder2 in colSubfolders2
    strFolderName = objFolder2.Name
    arrFolderPath = Split(strFolderName, "\")
    strNewPath = ""
    For i = 1 To Ubound(arrFolderPath)
    strNewPath = strNewPath & "\\" & arrFolderPath(i)
    Next
    strPath = strNewPath & "\\"
    Set colFiles = objWMIService.ExecQuery _
    ("Select * From CIM_DataFile Where Path = '" & strPath & "' AND LastModified > '" & strDate & "'")
    For Each objFile In colFiles
    objLogFile.WriteLine" " & strPath
    MsgBox strPath
    If objFile.Extension = "doc" Then
    strCopy = ColDrv & "\MGData\" & MigrateBox.value & "\Files\" & objFile.FileName & "." & objFile.Extension
    If objFSO.FileExists(strCopy) Then
    strCopy = ColDrv & "\MGData\" & MigrateBox.value & "\Files\" & objFile.FileName & "1" & "." & objFile.Extension
    End If
    objLogFile.WriteLine" " & objFile.FileName & "." & objFile.Extension
    objFile.Copy(strCopy),0,True
    End If
    If objFile.Extension = "dot" Then
    strCopy = ColDrv & "\MGData\" & MigrateBox.value & "\Files\" & objFile.FileName & "." & objFile.Extension
    If objFSO.FileExists(strCopy) Then
    strCopy = ColDrv & "\MGData\" & MigrateBox.value & "\Files\" & objFile.FileName & "1" & "." & objFile.Extension
    End If
    objLogFile.WriteLine" " & objFile.FileName & "." & objFile.Extension
    objFile.Copy(strCopy),0,True
    End If
    If objFile.Extension = "pdf" Then
    strCopy = ColDrv & "\MGData\" & MigrateBox.value & "\Files\" & objFile.FileName & "." & objFile.Extension
    If objFSO.FileExists(strCopy) Then
    strCopy = ColDrv & "\MGData\" & MigrateBox.value & "\Files\" & objFile.FileName & "1" & "." & objFile.Extension
    End If
    objLogFile.WriteLine" " & objFile.FileName & "." & objFile.Extension
    objFile.Copy(strCopy),0,True
    End If
    Next
    GetSubFolders strFolderName
    Next
    End If
    End Sub

    Function getDirectory()
    Set objWShell = CreateObject("WScript.Shell")
    Set Fso = CreateObject("Scripting.FileSystemObject")
    strDirectory = DirectoryBox.Value
    DirectoryBox.value = Mid(DirectoryBox.value,InStr(DirectoryBox.value,"\")+1)
    strBldDir = DirectoryBox.value
    'MsgBox strBldDir
    DirectoryBox.value = ""
    intSize = intSize + 1
    ReDim Preserve aryDirectories(intSize)
    ReDim Preserve aryDirectories2(intSize)
    aryDirectories(intSize) = strDirectory
    aryDirectories2(intSize) = strBldDir
    'MsgBox aryDirectories2(intSize)
    'MsgBox intSize
    End Function

    Function Migrate()
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objWShell = CreateObject("WScript.Shell")
    MigrateBox.value = Mid(MigrateBox.value,InStr(migrateBox.value,"\")+1)
    Set Fso = CreateObject("Scripting.FileSystemObject")
    Set Drv = Fso.Drives
    For Each StrDrv In Drv
    If StrDrv.DriveType = 4 Then
    If StrDrv.IsReady = True Then
    ColDrvs = StrDrv.path
    End If
    End If
    Next
    Trim(MigrateBox.value)
    If MigrateBox.value = "" Then
    MsgBox "You did not enter a user logon, please unplug the USB HDD before pressing 'Ok'"
    objWShell.Run ColDrvs & "\Tools\Tools.hta"
    Else
    objWShell.Run "%comspec% /c md " & ColDrv & "\MGData\" & MigrateBox.value & "\MyDocs" & chr(34),0,True
    objWShell.Run "%comspec% /c md " & ColDrv & "\MGData\" & MigrateBox.value & "\Favorites",0,True
    objWShell.Run "%comspec% /c md " & ColDrv & "\MGData\" & MigrateBox.value & "\Desktop",0,True
    objWShell.Run "%comspec% /c md " & ColDrv & "\MGData\" & MigrateBox.value & "\Outlook" & chr(34),0,True
    objWShell.Run "%comspec% /c md " & ColDrv & "\MGData\" & MigrateBox.value & "\Signatures" & chr(34),0,True
    objWShell.Run "%comspec% /c md " & ColDrv & "\MGData\" & MigrateBox.value & "\Local\Outlook" & chr(34),0,True
    objWShell.Run "%comspec% /c md " & ColDrv & "\MGData\" & MigrateBox.value & "\Files" & chr(34),0,True
    If Fso.FolderExists(ColDrv &"\MGData")= False Then
    MsgBox "USB HDD not found please unplug USB HDD and follow directions after restarting migration utility."
    If Fso.FileExists(ColDrvs & "\Tools\Tools.hta") Then
    objWShell.Run ColDrvs & "\Tools\Tools.hta"
    self.close
    End If
    End If
    objWShell.Run "%comspec% /c xcopy " & chr(34) & "c:\Documents and Settings\" & MigrateBox.value & "\My Documents\*.*" & chr(34) & " "& Chr(34) & ColDrv & "\MGData\" & MigrateBox.value & "\MyDocs\" & chr(34) & " /E /H /O /G /I /Y",1,True
    objWShell.Run "%comspec% /c xcopy " & chr(34) & "c:\Documents and Settings\" & MigrateBox.value & "\Favorites\*.*" & chr(34) & " "& Chr(34) & ColDrv & "\MGData\" & MigrateBox.value & "\Favorites\" & chr(34) & " /E /H /O /G /I /Y",1,True
    objWShell.Run "%comspec% /c xcopy " & chr(34) & "c:\Documents and Settings\" & MigrateBox.value & "\Desktop\*.*" & chr(34) & " "& Chr(34) & ColDrv & "\MGData\" & MigrateBox.value & "\Desktop\" & chr(34) & " /E /H /O /G /I /Y",1,True
    objWShell.Run "%comspec% /c xcopy " & chr(34) & "c:\Documents and Settings\" & MigrateBox.value & "\Application Data\Microsoft\Outlook\*.*" & chr(34) & " "& Chr(34) & ColDrv & "\MGData\" & MigrateBox.value & "\Outlook\" & chr(34) & " /E /H /O /G /I /Y",1,True
    objWShell.Run "%comspec% /c xcopy " & chr(34) & "c:\Documents and Settings\" & MigrateBox.value & "\Application Data\Microsoft\Signatures\*.*" & chr(34) & " "& Chr(34) & ColDrv & "\MGData\" & MigrateBox.value & "\Signatures\" & chr(34) & " /E /H /O /G /I /Y",1,True
    objWShell.Run "%comspec% /c xcopy " & chr(34) & "c:\Documents and Settings\" & MigrateBox.value & "\Local Settings\Application Data\Microsoft\Outlook\*.*" & chr(34) & " "& Chr(34) & ColDrv & "\MGData\" & MigrateBox.value & "\Local\Outlook\" & chr(34) & " /E /H /O /G /I /Y",1,True
    For i = 2 To intSize
    'MsgBox "xcopy " & aryDirectories(i) & "\*.*"
    objWShell.Run "%comspec% /c md " & ColDrv & "\MGData\" & MigrateBox.value & "\" & aryDirectories2(i)
    objWShell.Run "%comspec% /c xcopy "& Chr(34) & aryDirectories(i) & "\*.*" & Chr(34) & " " & Chr(34) & ColDrv & "\MGData\" & MigrateBox.value & "\" & aryDirectories2(i) &"\" & Chr(34) & " /E /H /O /G /I /Y",1,True
    Next
    CollectFiles
    If Fso.FolderExists(ColDrv &"\MGData")= True Then
    If Fso.FileExists(ColDrvs & "\Tools\done.hta") Then
    objWShell.Run ColDrvs & "\Tools\done.hta"
    End If
    End If
    self.close
    End If
    End Function
    Function CollectFiles()
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    strMonth = Month(Date)
    If Len(strMonth) = 1 Then
    strMonth = "0" & strMonth
    End If
    strDay = Day(Date)
    If Len(strDay) = 1 Then
    strDay = "0" & strDay
    End If
    strYear = Year(Date)-2
    'strdate = strYear & strMonth & strDay & "000000.000000+000"
    strdate = strMonth & "/" & strDay & "/" & strYear
    msgbox strDate & " " & Date
    'MsgBox aryDirectories2(intSize-1)
    'MsgBox aryDirectories2(intSize)
    'MsgBox intSize
    strFolderName = "c:"
    Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
    Set colSubfolders2 = objWMIService.ExecQuery _
    ("Associators of {Win32_Directory.Name='" & strFolderName & "'} " _
    & "Where AssocClass = Win32_Subdirectory " _
    & "ResultRole = PartComponent")
    For Each objFolder2 in colSubfolders2
    Found = 0
    For i = 1 To intSize
    'MsgBox UCase(objFolder2.name) & "\" & "---" & UCase("\" & aryDirectories2(i) & "\") & "=" & InStr(UCase(objFolder2.name) & "\", UCase("\" & aryDirectories2(i) & "\"))
    If InStr(UCase(objFolder2.name) & "\", UCase("\" & aryDirectories2(i) & "\")) <> 0 Then
    Found = 1
    Exit For
    End If
    Next
    If Found = 0 Then
    GetSubFolders objFolder2.name
    End If
    Next
    End Function

    Function Tools()
    Set Fso = CreateObject("Scripting.FileSystemObject")
    Set objWShell = CreateObject("WScript.Shell")
    Set Drv = Fso.Drives
    If Fso.FileExists(ColDrv & "\Tools\Tools.hta") Then
    objWShell.Run ColDrv & "\Tools\Tools.hta"
    End If
    'objWShell.Run ("wpeutil reboot")
    self.close
    end Function
    </script>

  7. Hi Guys,

    I have to use a script to migrate some file types and wanted you to look at my code to see if you knew how I can exclude certain folders to be searched as I'm already copying certain folders and don't need double copies?

    Look below at my code and see if you know how to exclude c:\Documents and Setting\*.* for instance. I have tried using an if statement in the GetSubFolders strFolderName area but the loop exits before finishing.

    Also I'm a bit of a novice so go easy on me if it is obvious.

    Thanks,

    Randy

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    strFolderName = "c:\"
    Set colSubfolders = objWMIService.ExecQuery _
    ("Associators of {Win32_Directory.Name='" & strFolderName & "'} " _
    & "Where AssocClass = Win32_Subdirectory " _
    & "ResultRole = PartComponent")
    arrFolderPath = Split(strFolderName, "\")
    strNewPath = ""
    For i = 1 to Ubound(arrFolderPath)
    strNewPath = strNewPath & "\\" & arrFolderPath(i)
    Next
    strPath = strNewPath & "\\"
    Set colFiles = objWMIService.ExecQuery _
    ("Select * from CIM_DataFile where Path = '" & strPath & "'")
    For Each objFolder in colSubfolders
    GetSubFolders strFolderName
    Next
    Sub GetSubFolders(strFolderName)
    Set colSubfolders2 = objWMIService.ExecQuery _
    ("Associators of {Win32_Directory.Name='" & strFolderName & "'} " _
    & "Where AssocClass = Win32_Subdirectory " _
    & "ResultRole = PartComponent")
    For Each objFolder2 in colSubfolders2
    strFolderName = objFolder2.Name
    arrFolderPath = Split(strFolderName, "\")
    strNewPath = ""
    For i = 1 to Ubound(arrFolderPath)
    strNewPath = strNewPath & "\\" & arrFolderPath(i)
    Next
    strPath = strNewPath & "\\"
    Set colFiles = objWMIService.ExecQuery _
    ("Select * from CIM_DataFile where Path = '" & strPath & "'")
    For Each objFile in colFiles
    If objFile.Extension = "mpeg" Then
    strCopy = "G:\MGData\Video\" & objFile.FileName & "." & objFile.Extension
    objFile.Copy(strCopy)
    End If
    If objFile.Extension = "mpg" Then
    strCopy = "G:\MGData\Video\" & objFile.FileName & "." & objFile.Extension
    objFile.Copy(strCopy)
    End If
    If objFile.Extension = "avi" Then
    strCopy = "G:\MGData\Video\" & objFile.FileName & "." & objFile.Extension
    objFile.Copy(strCopy)
    End If
    If objFile.Extension = "jpg" Then
    strCopy = "G:\MGData\Pictures\" & objFile.FileName & "." & objFile.Extension
    objFile.Copy(strCopy)
    End If
    If objFile.Extension = "bmp" Then
    strCopy = "G:\MGData\Pictures\" & objFile.FileName & "." & objFile.Extension
    objFile.Copy(strCopy)
    End If
    If objFile.Extension = "doc" Then
    'strCopy = "G:\MGData\Documents\" & objFile.FileName & "." & objFile.Extension
    'objFile.Copy(strCopy)
    End If
    If objFile.Extension = "ppt" Then
    strCopy = "G:\MGData\Documents\" & objFile.FileName & "." & objFile.Extension
    objFile.Copy(strCopy)
    End If
    If objFile.Extension = "txt" Then
    strCopy = "G:\MGData\Documents\" & objFile.FileName & "." & objFile.Extension
    objFile.Copy(strCopy)
    End If
    If objFile.Extension = "pdf" Then
    strCopy = "G:\MGData\Documents\" & objFile.FileName & "." & objFile.Extension
    objFile.Copy(strCopy)
    End If
    Next
    GetSubFolders strFolderName
    Next
    End Sub

  8. Thanks for the reply, I can get Explorer working didn't know that was an issue.

    I actually work for a large corporation and need to do some data migration under certain instances from with WinPE and am finding out that most data migration tools only work from inside the OS hence planned migrations only. When questioned about whether they will work in WinPE most are no but a couple have stated if I can get IE working it may be possible. So I'm not sure if Firefox would work, I guess I could ask if it is browser only or IE specific.

    I seem to never have easy issues, sorry about that guys. I guess I will get explorer working first and then come back to the forum.

  9. Hi guys,

    Thanks for all the previous help... now on to the show as they say.

    Has anyone been able to get USMT 3.0 to work from WinPE 2.0?

    While I can call it and run it, it doesn't migrate anything.

    Anyone have an ideas?

    Thanks,

    Randy

  10. Actually running it from a DVD-ROM drive.

    'This is the code used to find the DVD-ROM drive.

    'I also set a globalo variable of ColDrv

    Dim ColDrv, SYSID

    Function Window_Onload()

    Set Fso = CreateObject("Scripting.FileSystemObject")

    Set Drv = FSO.Drives

    For Each StrDrv in Drv

    If StrDrv.DriveType = 4 or 2 Then

    If StrDrv.IsReady = True Then

    If Fso.FileExits(StrDrv & "\Tools\Tools.txt") Then

    ColDrv = StrvDrv

    End If

    End If

    Else

    MsgBox "Could not find DVD attached to the system", vbError

    End If

    Next

    Using the Variable ColDrv I then try to run my install....

    I seem to make it in the script but when I go to run I get a file not found error?

    Do you think it is having issues with the global variable?

    Function Install()

    Set objWShell = CreateObject("WScript.Shell")

    objWShell.Run(ColDrv & "\Tools\dwait.hta")

    If SYSID = "30C5" Then

    'MsgBox "inside script"

    'MsgBox ColDrv

    objWShell.Run "cmd /c imagex /apply " & ColDrv & "\Sources\WinXP.wim 1 c:",0, True

    ElseIf SYSID = "30C9" Then

    objWShell.Run "cmd /c imagex /apply " & ColDrv & "\Sources\WinXP.wim 2 c:",0, True

    ElseIf SYSID = "0890" Then

    objWShell.Run "cmd /c imagex /apply " & ColDrv & "\Sources\WinXP.wim 3 c:",0, True

    End If

    objWShell.Run "%comspec% /c bootsect.exe /nt52 c: /force",0, True

    objWShell.Run "wpeutil reboot"

    self.close

    End Function

    Thanks for looking,

    Randy

  11. Actually still failing with a error message of file not found, here is what I have...

    objWShell.Run "cmd /k imagex /apply " & ColDrv & "\Sources\WinXP.wim 1 c:",1, True

    also tried the following with imagex placed in the \sources folder.

    objWShell.Run "cmd /k " & ColDrv & "\Sources\imagex /apply " & ColDrv & "\Sources\WinXP.wim 1 c:",1, True

    also added a MsgBox ColDrv before and after the call tag and each time the correct drive is listed.

    Yet if I run either one on a USB ThumbDrive is works fine but a DVD install fails... any ideas cause I'm stumped???

    But the real kicker is that while typing this reply I tried runing the hta again without reboot and it works just fine.?.?... reboot and the image fails file not found.

  12. Hey Guys,

    Thanks for all you previous help. Now I need some scripting help.

    I have a script that needs to apply a .WIM file but seems to freeze up for a moment and then ends and I can't fiure out why... so a fresh pair of eyes?

    script:

    Function Install()

    Set objWShell = CreateObject("WScript.Shell")

    objWShell.Run(ColDrv & "\Tools\dwait.hta")

    If SYSID = "30C5" Then

    'MsgBox "inside script"

    'MsgBox ColDrv

    objWShell.Run ("%comspec% /c imagex /apply ") & ColDrv & ("\Sources\WinXP.wim 1 c:"),0, True

    ElseIf SYSID = "30C9" Then

    objWShell.Run ("%comspec% /c imagex /apply ") & ColDrv & ("\Sources\WinXP.wim 2 c:"),0, True

    ElseIf SYSID = "0890" Then

    objWShell.Run ("%comspec% /c imagex /apply ") & ColDrv & ("\Sources\WinXP.wim 3 c:"),0, True

    Else

    msgbox "Could not find DVD attached to the system",vbError,"HP EUC"

    End If

    objWShell.Run ("%comspec% /c bootsect.exe /nt52 c: /force"), True

    objWShell.Run ("wpeutil reboot")

    self.close()

    End Function

    Ok, I'm passing in the drive letter for the value of 'ColDrv' but the system fails to apply the WIM file yet if I type 'imagex /apply e:\sources\winXP.wim 1 c:' it works fine. anyone know why then scripting fails? Also I have tried it with 'x:\windows\system32' in front of imagex but it still fails. The MsgBox's post just fine so I know I'm in the script.

    Anyone have any ideas?

    Thanks again for your help,

    Randy

  13. Hi guys,

    I was looking at the directions and it seems like a lot of work for what I need to do and was wondering if anyone knew of a tool or eay way to get a dual boot between a win98 boot floppy and WinPE 2.0? I have a couple utilites that need to be on the same CD and one will not run in a windows environment.

    Basically what I need is a bootable cd that can list a choice between win98 and winpe.

    I looked at the Multi-boot DVD Guide and found it quite confusing as I don't need to install an OS just make a dual boot cd.

    DONE!

    Intsructions below...

    Since I was not creating an OS install and only wanted to run some tools I did a little combining of the two guides I found.

    Here is what I did and thanks to all for your guides, while somewhat confusing I was able to use a couple of guides and build what I needed.

    I combined Tutorial Graphical Bootmenu along with How to Multi-boot DVD Guide... to get what I needed.

    I will see if I can explain it in my terms to make it as easy as possible.

    For what I wanted to do... run either boot floppy or bootable ISO files for a multiboot CD\DVD here is what I did.

    Using an attached HDD structure as follows (I used the example structure for easy of use)

    E:\AIO-DVD\

    You need CDImage and CDShell (download the shell source code) no one mentions this.

    Then you need a tool that can create boot images for floppy like WinImage or you can also use a cd recording software to make a bootable CD and create an ISO from it. Your choice I used a couple of tools as there are many out there like magic ISO for one.

    Place cdimage.exe on the root of the HDD that you are going ot build from, easiest way.

    Unzip CDShell onto the root of your devlopment HDD as above mine was E: now my structure looks like this:

    E:\AIO-DVD\

    E:\cdimage.exe

    E:\cdshell\boot\...

    E:\cdshell\licenses

    E:\cdshell\source

    E:\cdshell\tools

    Copy or move the contents of E:\cdshell\*.* to E:\AIO-DVD\ also create a folder called IMG under E:\AIO-DVD\BOOT\ (I preferred to copy so that I have the originals still and you really only need the boot and licenses folders.)

    Follow the Tutorial Graphical Bootmenu for creating your graphical interface and edit the cdshell.ini as suggested.

    Here is my cdshell.ini ... real simple my Tools.ISO is a win98 boot that has some DOS tools in it and the Migration.ISO is self explanatory WinPE 2.0 boot, our migration tool for my company.

    show image graphics\main.csi

    getkey

    if $lastKey == key[F1]; then diskemu img\Tools.iso

    if $lastKey == key[F2]; then diskemu img\Migration.iso

    if $lastKey == key[ESC]; then REBOOT COLD

    I built two .CSI files using the Graphical Tutorial a main and a splash for the splash I only used a black screen to appear part of the boot cycle.

    Finally copy your ISO files into the DVD\Boot\IMG directory. It should look as follows

    E:\AIO-DVD

    E:\AIO-DVD\Boot

    E:\AIO-DVD\Boot\fonts

    E:\AIO-DVD\Boot\graphics ... this is where the updated .CSI files will be located

    E:\AIO-DVD\Boot\img ... this is where your ISO files will be located

    E:\AIO-DVD\Boot\keymaps

    E:\AIO-DVD\Boot\modules

    E:\AIO-DVD\Boot\scripts

    E:\AIO-DVD\licenses

    Picture attached.. I think :unsure:

    Finally you need to run cdimage.exe and create the ISO that you can burn to a CD or DVD. Incidentally you could use this to run OS installs if you had some ISO files created. Here is the switch that I used. note: -l is for label, -t is for timestamp if you wish, -b is the location of the boot loader, -h is to include hidden files, -n is to allow long file names, -o if for optimzation believe it or not but even just using ISOs and a small file of only 200mb I still was able to remove 3 files, -m ignores 681,984,000 file limit in case you need a DVD which I always use to be consistant.

    E:\>cdimage.exe -lUtilities -t04/01/2008,17:45:00 -b\aio-dvd\boot\loader.bin -h -n -o -m \aio-dvd e:\tools.iso

    Thanks again to everyone for all your help in the past / future and I hope this was helpful in helping some of the in-experienced at setting up a multi-boot sytem using ISO files.

    Randy

    post-36658-1207162589_thumb.jpg

  14. Hi guys,

    Not such a newbie but just got this shoved into my lap.

    I have to create an image for Win2k (I know it's old) becasue of that I can not use WinPE 2.0.

    Does anyone know how to get WinPE RAM Disk to recognize SATA drivers?

    Everything that I did for my bootable CD is not working, I tried editing the txtsetup.xif the same way I did for the CD boot but know way will it work. Is that an issue with trying to create a ram disk.

    I'm very frustrated because I can get it to run on a CD everytime and using the exact same entries it fails on a ramdisk ISO???? !!!!! ????

    Anone know what gives? Can you not recognize SATA on a ramdisk ISO?

    Thanks for the help if you have any ideas.

    Randy

×
×
  • Create New...