Jump to content











Photo
* * * * * 1 votes

WimCaptEx: WIM handling w/o WAIK


  • Please log in to reply
53 replies to this topic

#26 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 19 November 2009 - 07:47 PM

Ifr there are any questions, suggestions, ...:
Now I'm reachable againj.


Good. :cheers:

Suggestion:
The .reg approach (wimmmount_legacy.reg) WON'T work unless the user (as Administrator) has full rights on the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root subtree.

Changing permissions in the Registry is not generally speaking advisable.

Information:
I am working on a .inf way to install that might (should it work :)) workaround this issue.

The new WimCaptEx.exe (x86) version DOES NOT run on my XP SP2.
This is the "Windows error":

AppName: wimcaptex.exe AppVer: 0.0.0.0 ModName: wimcaptex.exe
ModVer: 0.0.0.0 Offset: 00001464


Attached is a procmon output, should it be useful.

Question:
Can you explain me, as a non-programmer, why/how the Delphi version sized 26,624 bytes became in the new C version 81,408 bytes?

jaclaz

Attached Files



#27 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 19 November 2009 - 08:40 PM

The .reg approach (wimmmount_legacy.reg) WON'T work unless the user (as Administrator) has full rights on the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root subtree.

Changing permissions in the Registry is not generally speaking advisable.

Information:
I am working on a .inf way to install that might (should it work :cheers: ) workaround this issue.

Would be nice if you can give a solution which can be done from a WB script.
As you propably saw, I currently can only give a hint that the user must do something ...

The new WimCaptEx.exe (x86) version DOES NOT run on my XP SP2.
This is the "Windows error":
Attached is a procmon output, should it be useful.

Sorry, no experience with this. How can I read a *.PML?

Question:
Can you explain me, as a non-programmer, why/how the Delphi version sized 26,624 bytes became in the new C version 81,408 bytes?

That is perhaps a secret of Billy the Door.
To generate the final *.exe, I have the choice to use either the /MD or the /MT switch.
The /MD switch assumes that some dlls are present in your PC which are not installed in a standard installation.
The /MT switch includes their code in the *.exe.
After getting some error reports about missing DLLs, I decided to use /MT.

Why this issue is not occurring in a Delphi app, is outside of my knowledge (or does it not occur on a special PC because there are these special files present?)

Peter

#28 JonF

JonF

    Gold Member

  • .script developer
  • 1185 posts
  • Location:Boston, MA
  •  
    United States

Posted 20 November 2009 - 01:43 AM

Sorry, no experience with this. How can I read a *.PML?

Process Monitor

Press Control-E to stop capturing. Load the PML. Look at the Filter | Filter... menu.

#29 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 20 November 2009 - 07:51 AM

Yep.
I assumed procmon was a tool of common use, sorry for not specifying better. :cheers:

It can output also to .csv and .xml.

Attached all three versions.

Tell me if I should run another utility you are more familiar with.

jaclaz

Attached Files



#30 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 20 November 2009 - 09:07 AM

Yep.
I assumed procmon was a tool of common use, sorry for not specifying better. :cheers:

It can output also to .csv and .xml.

Attached all three versions.

Tell me if I should run another utility you are more familiar with.

jaclaz

*.csv looks well for me.

But here I cannot find the error you mentioned above.

Can you post the cmd window output?

Peter

#31 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 20 November 2009 - 09:47 AM

Can you post the cmd window output?


there is NONE. :cheers:

In exactly the same setup, the Delphi version (through my batch w_mount.cmd) works perfectly.

I am attaching also current ALPHA versions of my batches, that do work allright with the original Delphi version.

If it can help, if the service is not installed/files are not found the Delphi version says "nothing", whilst the C version throws an error saying file (example wimgapi.dll not found).

Besides, to use ONLY the "Capture" feature, the Delphi version does need NOT the service installed:

W_create.cmd ONLY needs WIMGAPI.DLL in the same folder or in \%Windir%\System32\ - NO Registry entries needed.


:cheers:

jaclaz

Attached Thumbnails

  • WimcaptDelphi.jpg
  • wimcapterror.jpg
  • wimcapterrorall.jpg

Attached Files



#32 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 20 November 2009 - 10:35 AM

If it can help, if the service is not installed/files are not found the Delphi version says "nothing", whilst the C version throws an error saying file (example wimgapi.dll not found).

I 'left' the delphi version with 2.0.0.

The C version is now with 3.3.0:
wimcaptex.gif
The enhanced error information is coded by me. Bitte the door does not tell you such things by OS.

I'll try to mount (with your syntax) in the debugger.

Because last days I focussed un Capture and Apply, I propably introduced a bug to Mount.

Peter

#33 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 20 November 2009 - 10:45 AM

Because last days I focussed un Capture and Apply, I propably introduced a bug to Mount.


Actually I just run WimCaptEx.exe WITHOUT ANY parameter.

It should either "say nothing" or show the help :w00t:, but definitely it shouldn't throw an error about a missing files and if the file is provided, fail alltogether. :cheers:

This:
wimcaptex.exe

ECHO %ERRORLEVEL%
throws the error and then:
C:\Downloaded\Wimgapi\testc>runit



C:\Downloaded\Wimgapi\testc>wimcaptex.exe



C:\Downloaded\Wimgapi\testc>ECHO -1073741819

-1073741819


If I remove wimgapi.dll from \Windows\System32\ I get:
C:\Downloaded\Wimgapi\testc>runit



C:\Downloaded\Wimgapi\testc>wimcaptex.exe



C:\Downloaded\Wimgapi\testc>ECHO -1073741515

-1073741515

Keeping or removing wimserv.exe returns the same -1073741819.

I'll try some more tests, it is well possible that I have managed to "botch" the setup, but why the "old" Deplphi works allright? :cheers:

jaclaz

#34 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 20 November 2009 - 11:07 AM

Actually I just run WimCaptEx.exe WITHOUT ANY parameter.

It should either "say nothing" or show the help :cheers: , but definitely it shouldn't throw an error about a missing files and if the file is provided, fail alltogether. :cheers:

This:

wimcaptex.exe

 ECHO %ERRORLEVEL%
throws the error and then:
C:\Downloaded\Wimgapi\testc>runit

 

 C:\Downloaded\Wimgapi\testc>wimcaptex.exe

 

 C:\Downloaded\Wimgapi\testc>ECHO -1073741819

 -1073741819


If I remove wimgapi.dll from \Windows\System32\ I get:
C:\Downloaded\Wimgapi\testc>runit

 

 C:\Downloaded\Wimgapi\testc>wimcaptex.exe

 

 C:\Downloaded\Wimgapi\testc>ECHO -1073741515

 -1073741515

I'll try some more tests, it is well possible that I have managed to "botch" the setup. :cheers:

jaclaz

Just for the record: If you convert the exitcode to HEX, and remove the higher order bits, you get error 5: ACCESS_DENIED.

I can reproduce a WimCaptEx crash when I start WimCaptEx in a command window or batch :cheers:

Thanks for helping to catch the bug!

Now again I need some time to kill the bug :w00t:

Peter

#35 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 20 November 2009 - 11:13 AM

I can reproduce a WimCaptEx crash when I start WimCaptEx in a command window or batch :cheers:


Waiter come taste this soup....
http://www.imdb.com/...98/crazycredits
Aha. Aha! ...

:w00t:

:cheers:

jaclaz

#36 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 20 November 2009 - 01:26 PM

Version 3.3.1 online and ready for test!

Peter

#37 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 20 November 2009 - 02:19 PM

If I remove EVERYTHING :):

C:\Downloaded\Wimgapi\testc>wimcaptex.exe

C:\Downloaded\Wimgapi\testc>ECHO -1073741515
-1073741515

Plus Windows error "a missing file, you might want to re-install the app".

With only WIMGAPI.DLL present :dubbio::
C:\Downloaded\Wimgapi\testc>wimcaptex.exe

WimCaptEx Program version 3.3.1

Copyright (C) 2009 Peter Schlang



Found wimgapi.dll version 6.1.7600.16385

wimserv.exe not found!wimmount.sys not found!



Press <Return> to finish ...





C&#58;\Downloaded\Wimgapi\testc>ECHO 8

8

With WIMGAPI.DLL and WIMSERV.EXE present ;):
C&#58;\Downloaded\Wimgapi\testc>wimcaptex.exe

WimCaptEx Program version 3.3.1

Copyright &#40;C&#41; 2009 Peter Schlang



Found wimgapi.dll version 6.1.7600.16385

Found wimserv.exe version 6.1.7600.16385

wimmount.sys not found!



Press <Return> to finish ...





C&#58;\Downloaded\Wimgapi\testc>ECHO 8

8

With WIMGAPI.DLL and WIMSERV.EXE and WIMMOUNT.SYS (but NOT installed) :(:
C&#58;\Downloaded\Wimgapi\testc>wimcaptex.exe

WimCaptEx Program version 3.3.1

Copyright &#40;C&#41; 2009 Peter Schlang



Found wimgapi.dll version 6.1.7600.16385

Found wimserv.exe version 6.1.7600.16385

wimmount.sys not found!



Press <Return> to finish ...





C&#58;\Downloaded\Wimgapi\testc>ECHO 8

8

With WIMGAPI.DLL and WIMSERV.EXE and WIMMOUNT.SYS (AND installed) ;):
SAME as above!

It is looking for wimmount.sys under %Windir%\System32\ INSTEAD of under %Windir%\System32\drivers\ ;)

Added a copy of wimmount.sys in %Windir%\System32\ :
WORKING! :w00t:

I will wait for the checks fixed before try to actually run it.

There is NO hurry, though. :cheers:

jaclaz

#38 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 20 November 2009 - 03:00 PM

On my system wimmount.sys is found!

Maybe different environment definitions.

I now added the "drivers\" explicitelly.

Try version 3.3.2

Peter

#39 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 20 November 2009 - 03:36 PM

Missing wimmount.sys seems fixed. ;)

If I remove WIMGAPI.DLL same error. :(

If everything is installed everything is working, all the batches work allright without modifications. :)

STILL, if one ONLY wants to create a .wim, the Delphi version required ONLY WIMGAPI.DLL (that could be also in the same directory) and NO Registry entries. <- this could be useful for on-the-fly .wim creation without install.

I solved the install problem through a .inf file. ;)

I am currently working on UNinstalling..... it looks like tricky :dubbio: ...but as always I am optimist.

;)

jaclaz

Attached Thumbnails

  • 332error.jpg


#40 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 20 November 2009 - 04:15 PM

Version 3.3.3 checks for wimmount.sys and wimserv.exe only if
  • There is no command line argument or
  • The -A:M switch (mount) is set.
Peter

#41 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 20 November 2009 - 07:22 PM

Everything seems fine. :w00t:

Attached WimToolBatches, now with:
w_create.cmd	  <- to create an image

w_install.cmd	 <- to install the set of files and services &#40;uses wimtools.inf&#41;

w_mount.cmd	   <- to mount an image

w_test.cmd		<- to test the state of the service

w_uninstall.cmd   <- to uninstall the service 

w_unmount.cmd	 <- to mount an image

wimtools.inf	  <-.inf install file, you can right click in Explorer and Install

Add in the same directory (stoopidly long paths with spaces in it NOT tested):

wimgapi.dll

wimmount.sys

wimserv.exe

and of course :cheers: :
WimCaptEx.exe
from:
http://nativeex.boot...x/WimCaptEx.htm

Please note that a suitable source for the Windows 7 files is this stoopidly long path (but without spaces ;)):

\sources\boot.wim\2\Windows\winsxs\x86_microsoft-windows-wimgapi_31bf3856ad364e35_6.1.7600.16385_none_88d1f88d76321f27\
\sources\boot.wim\2\Windows\winsxs\x86_microsoft-windows-wimgapi_31bf3856ad364e35_6.1.7600.16385_none_88d1f88d76321f27\wimserve.exe
\sources\boot.wim\2\Windows\winsxs\x86_microsoft-windows-wimgapi_31bf3856ad364e35_6.1.7600.16385_none_88d1f88d76321f27\wimgapi.dll
\sources\boot.wim\2\Windows\winsxs\x86_microsoft-windows-wimgapi_31bf3856ad364e35_6.1.7600.16385_none_88d1f88d76321f27\wimmount.sys


WARNING:
This is NOT a joke, use the batches at your own risk, they could be hose your system in no time. ;)
They are at this moment VERY experimental, don't come here whining about an unbootable system, I told you. :w00t:

However reports from the bravehearts (or more experienced peeps around) are welcome. :cheers:

The (very little testing) has been carried on x86 ONLY, I have no idea if the batches will work on x64, nor if they can be easily adapted to it.
(this seems like work for Lancelot ;) )

@peter
To install from Winbuilder, you can use the .inf file allright, calling SETUPAPI.DLL like I do in w_install.cmd
To uninstall, I tried to use as well the .inf file but wasn't able to make it work :), I guess you can use SC as I do in w_uninstall.cmd.

:dubbio:

jaclaz

P.S.:
I am posting a new thread with the same info:
http://www.boot-land...?showtopic=9765
let's keep this one for development. :(

Attached Files



#42 paraglider

paraglider

    Gold Member

  • .script developer
  • 1739 posts
  • Location:NC,USA
  •  
    United States

Posted 21 November 2009 - 01:22 PM

wimcaptex works ok on win7 x64 with no files in the same directory as the program. Correctly finds the installed wimgapi.dll

Be nice when mounting a wim if it checked that the wim exists and showed an error if not. Same with mount directory. In that case it could create it if it does not exist.

#43 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 22 November 2009 - 09:23 AM

Be nice when mounting a wim if it checked that the wim exists and showed an error if not. Same with mount directory. In that case it could create it if it does not exist.


Guess why I put together the batches? :)
C&#58;\Downloaded\Wimgapi\testfinal>w_mount

Currently mounted image&#40;s&#41;&#58;

None



Little batch to easen the use of WimCaptEx.exe

in order to mount an existing .wim image



Syntax&#58;

w_mount.cmd <source_wim> <target_dir> &#91;Image_number&#93;



EXAMPLES&#58;

w_mount boot.wim C&#58;\mydir\ 2

will mount Image #2 of a boot.wim in the same directory where the batch is to

directory &#34;C&#58;\mydir&#34;

If &#91;Image_number&#93; is omitted, it will default to #1



w_mount &#34;C&#58;\my long path with spaces in it\mywim.wim&#34; &#34;F&#58;\another stoopidly long

 path\&#34;

will mount Image #1 of &#34;C&#58;\my long path with spaces in it\mywim.wim&#34; to

directory  &#34;F&#58;\another stoopidly long path\&#34;



IF target directory does not exist the batch will attempt creating it.



:cheers:

jaclaz

#44 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 22 November 2009 - 05:37 PM

wimcaptex works ok on win7 x64 with no files in the same directory as the program. Correctly finds the installed wimgapi.dll

Be nice when mounting a wim if it checked that the wim exists and showed an error if not. Same with mount directory. In that case it could create it if it does not exist.

WimCaptEx 3.4.0 has a new optional switch :dubbio:
-Q(uiently create new directories if necessary)

This is valid for
  • The directory where a new *.win should be created
  • The directory into which an image is going to be mounted
  • The directory into which an image is going to be applied
Peter

#45 Veegertx

Veegertx
  • Members
  • 1 posts
  •  
    United States

Posted 21 March 2010 - 10:34 PM

nice one psc
will need to test this some or is there better now

#46 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 30 March 2010 - 10:35 AM

WIMCaptEx.exe version 4.0.0 is online (Link in the first post).

It has 2 new actions:
  • -A:S delivers the status of a mounted image.
  • -A:R remounts an image whis has been mounted before booting.
Both actions can be used to help when a mount by imagex returns with an error, or when the mouted directory seems to be undeletable.

I wrote a GUI which uses the new functions to clean this issue.

See here.

Peter

#47 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 01 April 2010 - 03:49 PM

WimCaptEx version 4.1.0 is online (Link in the first post)

It 4.1.0 has a new action -A:I (means "Intelligent mount")

This action of WimCaptEx performs a mount depending on current conditions:
  • When the WIM / image is already mounted, do nothing.
  • When the WIM / image is remountable, do a remount.
  • When the mount directory already is the mount of a different WIM / image, unmount the current image, then mount the new one.
  • If none of the previous conditions matched, do a fresh mount.

That makes it possible in Win7 projects, NOT to unmount at the end of the build and having the mounted directory ready in the next build.
Because remount is MUCH faster than the mount, using -A:I will safe a lot of build time.

Peter

#48 paraglider

paraglider

    Gold Member

  • .script developer
  • 1739 posts
  • Location:NC,USA
  •  
    United States

Posted 01 April 2010 - 11:10 PM

Why is it so hard to get this utility? Link in first post contains a very old version 2.0.0

#49 paraglider

paraglider

    Gold Member

  • .script developer
  • 1739 posts
  • Location:NC,USA
  •  
    United States

Posted 01 April 2010 - 11:15 PM

Cannot never get cleanmountex to show any mounts even if I run it when a winbuilder win7pe build is active. I am running on win7 x64.

-A:M option never works for me either. Never reports an error just echoes the command line:

&#91;E&#58;\ZIP\WimCaptEx&#93;WimCaptEx_x64.exe -A&#58;M -W&#58;f&#58;\win7.x86\sources\install.wim -I&#58;1 -D&#58;e&#58;\zip\wimcaptex\mount

WimCaptEx Program version 4.1.0

Copyright &#40;C&#41; 2009, 2010 Peter Schlang



Found wimgapi.dll version 6.1.7600.16385

Found wimserv.exe version 6.1.7600.16385

wimmount service is detected

Found wimmount.sys version 6.1.7600.16385



WimCaptEx_x64.exe -A&#58;M -W&#58;f&#58;\win7.x86\sources\install.wim -I&#58;1 -D&#58;e&#58;\zip\wimcaptex\mount


#50 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 02 April 2010 - 03:14 PM

Both are issues depending on running on a 64 bit host.

Fixed now.

Peter




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users