Jump to content











Photo
- - - - -

WinBuilder Copy Errors.


  • Please log in to reply
14 replies to this topic

#1 dpminusa

dpminusa
  • Members
  • 9 posts
  • Location:USA
  • Interests:Blue Grass Music
  •  
    United States

Posted 20 December 2010 - 03:03 AM

I am using the VistaPE system. It is not clear to me how the temp folder is built. I see file copy errors from it to my build windows\system32. My ISO loads but a number of DLLs are missing when I try to use it. These are the ones in the error list.

My initial goal was to make a DriveImage XML boot disk for my Vista Bus 32 SP2 system. I used a driveImage.script I found on a forum. I checked it against dependency walker for dixml.exe and added what I thought were the missing file copy statements.

My driveImageXML.script now has the following [Process] section:
...

[Process]
Echo,Processing %ProgramTitle%...
RunFromRam,%pCheckBox1%
Unpack,Files,DriveImageXML.7z,True
FileCopy,"%InstallSRC%\Windows\System32\sfc.dll","%TargetDir%\Windows\System32"
...

sfc.dll is one of the files not copied. I get over 50 of these.
FileCopy - Failed to copy [%BaseDir%\Temp\VistaPE-Core\InstallWimSrc\Windows\System32\sfc.dll] to: [%BaseDir%\Target\VistaPE-Core\Windows\System32]

...

Clearly I am not grasping something here.

My source is the Windows AIK directory in my program folders.

So how are the temp folder entries prepared by the build? Should I be adding something to my scripts or ??

Any help would be appreciated.

#2 Nuno Brito

Nuno Brito

    Platinum Member

  • Team Reboot
  • 10452 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 20 December 2010 - 10:21 AM

Why do you post this message on the Hello World section? :dubbio:

There exists a VistaPE section on site.

:confused1:

#3 al_jo

al_jo

    Gold Member

  • Members
  • 1218 posts
  • Location:Tellus

Posted 20 December 2010 - 02:43 PM

My source is the Windows AIK directory in my program folders.


I’m not sure if this helps but:
Why not try using your Vista dvd/iso as source instead?
And in the preconfig script point to the Waik folder…

#4 Nuno Brito

Nuno Brito

    Platinum Member

  • Team Reboot
  • 10452 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 20 December 2010 - 03:45 PM

I'm moving this topic to the VistaPE section to keep it in context.

:dubbio:

#5 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1335 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 20 December 2010 - 07:44 PM

I am using the VistaPE system. It is not clear to me how the temp folder is built.

Well, it depends on what is going on, but if you dig a bit deeper, the error can reveal a good deal of information

I see file copy errors from it to my build windows\system32. My ISO loads but a number of DLLs are missing when I try to use it. These are the ones in the error list.

FileCopy - Failed to copy [%BaseDir%\Temp\VistaPE-Core\InstallWimSrc\Windows\System32\sfc.dll] to: [%BaseDir%\Target\VistaPE-Core\Windows\System32]

The key to decoding the above error messaged is the fact that it is also calling out (below the Temp area) the "InstallWimSrc" folder, which is the source "wim" file. This is because that wim is mounted for access and the mounting uses the temp area (as do many other things). It is just that - a temporary area. Some scripts mount WIM files, some copy files from the internet, etc.

So, since you said you were pointing at the WAIK for the "source", I would suspect that it doesn't have the required sfc.dll file, and that you should try pointing at a local disk copy of the actual installation DVD/CD as the "source" for the build...(as was suggested)...

Scott

#6 dpminusa

dpminusa
  • Members
  • 9 posts
  • Location:USA
  • Interests:Blue Grass Music
  •  
    United States

Posted 21 December 2010 - 03:09 AM

Why do you post this message on the Hello World section? :)

There exists a VistaPE section on site.

:(


I was concentrating and it was late. I noticed this after posting but could not see where you can move posts to other forums. Since this was my first post I was put in the hello world by default.

Anyway I did notice it before you mentioned it.

#7 dpminusa

dpminusa
  • Members
  • 9 posts
  • Location:USA
  • Interests:Blue Grass Music
  •  
    United States

Posted 21 December 2010 - 03:11 AM

I'm moving this topic to the VistaPE section to keep it in context.

:)


Thanks Nuno.

#8 dpminusa

dpminusa
  • Members
  • 9 posts
  • Location:USA
  • Interests:Blue Grass Music
  •  
    United States

Posted 21 December 2010 - 06:35 AM

I figured out how to get rid of the Filecopy errors and get my DriveImage XML to run from VistaPE.

Here is what I did incase others may need the information.

1. I changed the Filecopy lines in my DriveImage XML.script to use C:\Windows\System32 rather than %InstallSRC\Windows\System32
2. I made my Source C:\Program Files\Windows AIK

Overall to make the DriveImage XML recovery CD I wanted these were the steps I followed.

1. Downloaded and installed VistaPE 12 from WinBuilder. Used the download option to add the files WinBuilder recommends
2. Found a DriveImage XML VistaPE .script file on the net to start from. Note that WinBuilder does have a Conversion from BartPE .inf Plug-in to its .script files. So if you can find a BartPE Plug-in you can convert it and finish it the WinBuilder script editor.
3. Profiled dixml.exe, the main DriveImage XML executable, with dependency walker (free download) to see what DLLs were needed.
4. Add Filecopy statements to the .script file in the Process Block to add the .dll files that were not already listed in the .script.
The format of each statement was:
FileCopy,"C:\Windows\System32\sfc.dll","%TargetDir%\Windows\System32"
5. Added finished script to the VistaPE Project Folder in the VistaPE-Core\App\Data Recovery sub-directory.
6. Set the Source Location under the Source Tab to C:\Program Files\Windows AIK. I had previously downloaded Windows AIK for Microsoft as an ISO, burned it with ImgBurn and installed it.
7. Built the VistaPE ISO by using the Play Icon.
8. Burned the VistaPE ISO with ImgBurn. ImgBurn is an amazingly detailed program. I would recommend it as the best Freeware burner.

Those are the steps i used, as best I can remember. I found the overall process a bit difficult coming to it fresh. I had previous (about 5 years ago) used BartPE to make a DriveImage XML recovery CD for XP. That gave me a bit of help but not too much.

I found the difficult steps to be:
1. Finding a DriveImage XML script file to work with.
2. Understanding the WinBuilder errors and resolving them.

A couple of suggestions:
1. Would a useful feature be to allow the inclusion of all of the DLLs in C:\Windows\System32 on your active system as an option. Or a script builder step that lists them and let's you delete the ones you don't want, then creates the script for the ones remaining. This seems like it may be a way to eliminate some of the complexity in the scripts and tinkering with dependency walker, etc. If this feature, or something that already makes it unnecessary, is in WinBuilder I missed it. Since I am new to it, I may have not seen it.

VistaPE and WinBuilder are great accomplishments. I am a developer, so I can see the effort involved.

Thanks NightMan, at the others who replied to my post.

I am going to try to get Macrium Reflect goind next, so I may need more help with it.

Edited by dpminusa, 21 December 2010 - 06:39 AM.


#9 al_jo

al_jo

    Gold Member

  • Members
  • 1218 posts
  • Location:Tellus

Posted 21 December 2010 - 08:21 AM

I am going to try to get Macrium Reflect goind next, so I may need more help with it.


There is an "Amalux" script for Macrium Reflect here:
http://www.mediafire...acReflectPE.rar
:)

#10 dpminusa

dpminusa
  • Members
  • 9 posts
  • Location:USA
  • Interests:Blue Grass Music
  •  
    United States

Posted 24 December 2010 - 08:58 AM

There is an "Amalux" script for Macrium Reflect here:
http://www.mediafire...acReflectPE.rar
:frusty:


Tks. Will give it a try.

The trick so far seems to be to make sure the DLLs used by Reflect are part of the script as Filecopy statements or are added by another script first. That is where the dependency walker came in.

#11 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1335 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 25 December 2010 - 05:40 PM

A couple of suggestions:
1. Would a useful feature be to allow the inclusion of all of the DLLs in C:\Windows\System32 on your active system as an option. Or a script builder step that lists them and let's you delete the ones you don't want, then creates the script for the ones remaining. This seems like it may be a way to eliminate some of the complexity in the scripts and tinkering with dependency walker, etc. If this feature, or something that already makes it unnecessary, is in WinBuilder I missed it. Since I am new to it, I may have not seen it.

VistaPE and WinBuilder are great accomplishments. I am a developer, so I can see the effort involved.

While not exactly what you suggest, most projects DO have a way to include other files. BUT, creating a very simple script that has a check box to do the copy would be rather simple...Making a more complex script to create the script (so to speak) a bit more work...

I think that for most projects, they try to do the minimal, and that is why you haven't seen something like this before.

BUT, this is a good idea, and maybe should be added to one (or more) of the projects...

And good tip for others on using the dependency walker to identify what else it needed...again, in the scripting, you could also "bullet proof" the script to see if it was already in the area being build up for the new PE, then if not, look in the "source", and then as a last resort (and if x86 vs. x64 for target matches), copy from local build system...

Good Work, and WELCOME!

#12 dpminusa

dpminusa
  • Members
  • 9 posts
  • Location:USA
  • Interests:Blue Grass Music
  •  
    United States

Posted 25 December 2010 - 10:29 PM

While not exactly what you suggest, most projects DO have a way to include other files. BUT, creating a very simple script that has a check box to do the copy would be rather simple...Making a more complex script to create the script (so to speak) a bit more work...

I think that for most projects, they try to do the minimal, and that is why you haven't seen something like this before.

BUT, this is a good idea, and maybe should be added to one (or more) of the projects...

And good tip for others on using the dependency walker to identify what else it needed...again, in the scripting, you could also "bullet proof" the script to see if it was already in the area being build up for the new PE, then if not, look in the "source", and then as a last resort (and if x86 vs. x64 for target matches), copy from local build system...

Good Work, and WELCOME!


I have read through the Script Syntax Notes briefly. I can see that the scope to make a script to do what I want is there.

On the Macrium Reflect script. I have not been successful in getting it to run. It was missing some DLLs, so I added FileCopy statements for them to the [Process] section. My ISO completes but booting the system with the CD blue screens with an reference error.

I am trying to develop enough of an understanding of WinBuilder and of the Macrium Appliication to debug this. Slow going.

How does the virtual test work?

I was trying to find where the %ScriptDir% variable is defined. Did not see it anywhere. What is its definition?

Any debugging techniques you recommend. I see the echo and message. What about debugging the image during boot?

Thanks in advance.

Edited by dpminusa, 25 December 2010 - 10:31 PM.


#13 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1335 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 25 December 2010 - 11:45 PM

How does the virtual test work?

That helps simplify the process of using a VM to run the ISO image - avoids the need to boot off USB or burn a physical media. Once you set up somethign like virtual box or even VMware, it's pretty easy to just use it to boot the ISO image, but these scripts help automate the creation of the initial VM

I was trying to find where the %ScriptDir% variable is defined. Did not see it anywhere. What is its definition?

It just refers to the current running script, so that if you want to jump to a subroutine in the same file, it's already defined. Winbuilder has the ability to jump to a subroutine in ANY file, but most scripts (especially APPs) tend to be more self contained. But the power is there to go a bit overboard if you want to and jump around between scritps...

Any debugging techniques you recommend. I see the echo and message. What about debugging the image during boot?

Well, I haven't had any real experiance with anything but those sorts of tools - AFAIK, there isn't any sort of single stepper or the like for the winbuilder engine. There are some debugging settings you can set in the winbuilder options so you can see the statements and the results. Trying to debug during boot is black magic to me...

#14 dpminusa

dpminusa
  • Members
  • 9 posts
  • Location:USA
  • Interests:Blue Grass Music
  •  
    United States

Posted 26 December 2010 - 07:04 AM

Thanks for the guidance.

I saw that %ScriptFile% was defined as the running script files I assumed %ScriptDir% was different. I thought maybe it was the Directory where the .script was found. Perhaps this was useful to reference subdirectories for FileCopy or ???

e.g. %ScriptDir%\files

I am just guessing.

I was curious because the Macrium script I am rying to debug uses it. I notice that WinBuilder does as well but I could not find an explicit Variable assignment.

Here is what I have so far. Perhaps the error causing the Blue screen is clear to you or other readers:

[Main]
Title=Macrium Reflect
Type=script
Selected=True
Level=5
Author=WinBuilder version 075
Credits=PEBuilder plugin macrium.inf mods dpminusa

[Variables]
%a_dir%=%target_prog%\Macrium

[Process]
Echo,"Copying Macrium DLL files.."
FileCopy,"c:\windows\system32\ADVAPI32.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\CLBCATQ.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\COMCTL32.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\COMDLG32.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\GDI32.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\IERTUTIL.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\IMAGEHLP.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\IMM32.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\KERNEL32.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\LPK.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\MSCTF.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\MSVCRT.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\NORMALIZ.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\NSI.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\NTDLL.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\OLE32.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\OLEAUT32.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\PSAPI.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\RPCRT4.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\SETUPAPI.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\SHELL32.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\SHLWAPI.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\URLMON.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\USER32.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\USP10.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\WININET.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\WLDAP32.DLL","%TargetDir%\Windows\System32"
FileCopy,"c:\windows\system32\WS2_32.DLL","%TargetDir%\Windows\System32"
//
// ================================================================
If,ExistFile,%ProjectDir%\infconvert.ini,AddVariables,%ProjectDir%\infconvert.ini,variables
If,NotExistVar,%LocProgSM%,Exit,"You must define %LocProgSM% to use this plugin!"
If,NotExistVar,%LocProgNam%,Exit,"You must define %LocProgNam% to use this plugin!"
If,NotExistVar,%drFile%,Exit,"You must define %drFile% to use this plugin!"
If,NotExistVar,%spFile%,Exit,"You must define %spFile% to use this plugin!"
//
// ================================================================
Run,%ScriptFile%,WinntDirectories
Run,%ScriptFile%,SourceDisksFiles
Run,%ScriptFile%,SetupReg.AddReg
Run,%ScriptFile%,Append

[WinntDirectories]
Echo,"Making new directories.."
DirMake,%target_prog%\Macrium

[SourceDisksFiles]
Echo,"Copying files.."
FileCopy,"%ScriptDir%\files\ReflectPE.exe","%a_dir%"
FileCopy,"%ScriptDir%\files\PEExplorer.exe","%a_dir%"
FileCopy,"%ScriptDir%\files\psmounter.sys","%a_dir%"
Run,%ScriptFile%,Inf-Copy,udfs.sys,"%target_sys%\drivers"

[SetupReg.AddReg]
Echo,"Loading registry hive: [setupreg.hiv]"
Hive_Load,HKLM
Echo,"Writing new values on registry hive.."
reg_add,0x4,"%reg%\Controlset001\Services\Udfs","ErrorControl","1"
reg_add,0x1,"%reg%\Controlset001\Services\Udfs","Group","File system"
reg_add,0x4,"%reg%\Controlset001\Services\Udfs","Start","1"
reg_add,0x4,"%reg%\Controlset001\Services\Udfs","Type","2"
reg_add,0x1,"%reg%\Controlset001\Services\Udfs\Enum","0","Root\\LEGACY_UDFS\\0000"
reg_add,0x4,"%reg%\Controlset001\Services\Udfs\Enum","Count","1"
reg_add,0x4,"%reg%\Controlset001\Services\Udfs\Enum","NextInstance","1"
reg_add,0x4,"%reg%\ControlSet001\Enum\Root\LEGACY_UDFS","NextInstance","1"
reg_add,0x1,"%reg%\ControlSet001\Enum\Root\LEGACY_UDFS\0000","Service","Udfs"
reg_add,0x4,"%reg%\ControlSet001\Enum\Root\LEGACY_UDFS\0000","Legacy","1"
reg_add,0x4,"%reg%\ControlSet001\Enum\Root\LEGACY_UDFS\0000","ConfigFlags","0"
reg_add,0x1,"%reg%\ControlSet001\Enum\Root\LEGACY_UDFS\0000","Class","LegacyDriver"
reg_add,0x1,"%reg%\ControlSet001\Enum\Root\LEGACY_UDFS\0000","ClassGUID","{8ECC055D-047F-11D1-A537-0000F8753ED1}"
reg_add,0x1,"%reg%\ControlSet001\Enum\Root\LEGACY_UDFS\0000","DeviceDesc","Udfs"
reg_add,0x1,"%reg%\ControlSet001\Enum\Root\LEGACY_UDFS\0000\Control","ActiveService","Udfs"
Hive_Unload,HKLM

[Append]
Add_Shortcut,StartMenu,"","#$pSystemDrive#$p\%LocProgNam%\Macrium\reflectPE.exe","Macrium Reflect"

[Inf-Copy]
StrFormat,path,#2,%pth%
If,NotExistDir,%pth%,DirMake,%pth%
StrFormat,RTrim,#1,1,%short%
StrFormat,Right,#1,1,%right%
Run,%ScriptFile%,Load-Driver,%short%,%right%,#2

[Load-Driver]
If,ExistFile,"%source_win%\%spFile%",ShellExecute,"hide","expand.exe","#$q%source_win%\%spFile%#$q -F:#1#2 #$q#3#$q"
If,NotExistFile,#3,ShellExecute,"hide","expand.exe","#$q%source_win%\%drFile%#$q -F:#1 #$q#3#$q"
If,NotExistFile,#3,If,ExistFile,%source_win%\#1*,CopyOrExpand,%source_win%\#1#2,#3

#15 dpminusa

dpminusa
  • Members
  • 9 posts
  • Location:USA
  • Interests:Blue Grass Music
  •  
    United States

Posted 29 December 2010 - 08:05 PM

I was not able to get the Macrium scripts I found to work by tweaking them. I am not sure if this is a registry, driver, or ??? issue. Any other ideas let me know.

I found another less robust approach that did work. This may be helpful to others.

I made a script to include the Macrium roborestore utility that employs the Microsoft robocopy utility. It is easier because both of these seem to be portable or stand-a-lone programs. No registry or COM issues.

Macrium has an article on this at:
Article link

Edited by dpminusa, 29 December 2010 - 08:07 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users