• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
JFX

Get WAIK Tools w/o downloading the huge ISO's

96 posts in this topic

Most of us don't really need/use the WAIK to build our custom WinPE's.

So there were always a problem to get the few tools like wimgapi, imagex or the WIM filter drivers.

Attempts were made to use httpdisk to download files from inside the WAIK iso,
but it was not a good solution as you still need to load hundreds of MB and it requires to install an unsigned driver.
You even had to set your x64 Windows in testmode ...


But now we came with a good solution:

Our tool uses cURL winhttp functions provided by Homes32 to download only the needed bytes for the hugh WAIK ISO's.
There is no need for admin rights and you only need to download 4-6 MB per choosen WAIK.

GetWaikTools.zip   (yes: always a link to the latest version, of course!).

For command line: GetWaikTools -?

 

cheers.gif

7

Share this post


Link to post
Share on other sites

Not a bad solution, and an entirely legit one too (it downloads only the "useful" part of download.microsoft.com/download/8/E/9/8E9BBC64-E6F8-457C-9B8D-F6C9A16E6D6A/KB3AIK_EN.iso basically e.g. bytes 129740800 to 136032256 for the Win7 version).

0

Share this post


Link to post
Share on other sites

Thanks for this very NICE Solution :)

:thumbup

Edited by wimb
0

Share this post


Link to post
Share on other sites

Not a bad solution, and an entirely legit one too (it downloads only the "useful" part of download.microsoft.com/download/8/E/9/8E9BBC64-E6F8-457C-9B8D-F6C9A16E6D6A/KB3AIK_EN.iso basically e.g. bytes 129740800 to 136032256 for the Win7 version).

Not really, as it distributes Curl without the required COPYING text:

COPYRIGHT AND PERMISSION NOTICE

Copyright © 1996 - 2012, Daniel Stenberg, <daniel@haxx.se>.

All rights reserved.

Permission to use, copy, modify, and distribute this software for any purpose

with or without fee is hereby granted, provided that the above copyright

notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN

NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,

DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR

OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE

OR OTHER DEALINGS IN THE SOFTWARE.

Except as contained in this notice, the name of a copyright holder shall not

be used in advertising or otherwise to promote the sale, use or other dealings

in this Software without prior written authorization of the copyright holder.

but this is easily correctable :).

I am much more puzzled by the fact that his nice :thumbup: idea has been implemented as a 650 kb .exe that seemingly does the same as chosing between a set of three one liners similar to this:

curl.exe <some options> <some http address>

and a few "bells and whistles" around them.

Maybe, it would be nice if the <some options> were explicited and the same approach could be re-used easily for other tools/files, etc.

In a first test after having a nice looking green progress bar across the screen showing the download progress, I got "Checksum mismatch" and no files were downloaded (actually they were most probably downloaded but immediately deleted).

Is there any particular trick involved in using the thingy or it only works if you run Vista :ph34r: or later, or what?

jaclaz

0

Share this post


Link to post
Share on other sites

but this is easily correctable :).

Done.

I am much more puzzled by the fact that his nice :thumbup: idea has been implemented as a 650 kb .exe that seemingly does the same as chosing between a set of three one liners similar to this:

curl.exe <some options> <some http address>

and a few "bells and whistles" around them.

Maybe, it would be nice if the <some options> were explicited and the same approach could be re-used easily for other tools/files, etc.

In a first test after having a nice looking green progress bar across the screen showing the download progress, I got "Checksum mismatch" and no files were downloaded (actually they were most probably downloaded but immediately deleted).

Is there any particular trick involved in using the thingy or it only works if you run Vista :ph34r: or later, or what?

Hmm, I don't think that a 650 KB exe is big, but seriously your right the actual download is not more than that:

curl -N -r 129740800-136032256 http://download.microsoft.com/download/8/E/9/8E9BBC64-E6F8-457C-9B8D-F6C9A16E6D6A/KB3AIK_EN.iso -o"Neutral.cab"

129740800 - 136032256 is the begin and end offset to download, easily to get with an good HexEditor

The 500+ lines au3 code is used to decompress the broken cab file, rename and sort the files according their architecture.

To avoid corrupt downloads, all files are hashed in the end.

Should work now in WinXP, too

cheers.gif

Edited by JFX
0

Share this post


Link to post
Share on other sites

very nice work! congrads on the release! :)

0

Share this post


Link to post
Share on other sites

Great, Very usefull tool :thumbup

I have downloaded needed Win7, Vista Waik files and Win8 ADK files in less than 30 seconds :w00t:

Edited by ChrisR
0

Share this post


Link to post
Share on other sites

And thank you for the switches to be launched in command line B)

GetWaikTools.exe -?

cheers.gif

0

Share this post


Link to post
Share on other sites

Should work now in WinXP, too

Confirmed working on XP too. :thumbup:

What I intended was something slightly different than having the actually used command line (but thanks anyway for that :)), I was hinting how, using the same "codebase" we could have a more "generalistic" approach, i.e. something that could accept user parameters for *other* files and *other* .iso's.

As a side note (and not actually specifically needed for this) one of my semi-random thoughts :ph34r::

Could we get the "initial" part of *any* .iso and analyze it with isoinfo or a similar tool (to get a specific file address/offset/etc.)?

In other words this nice app is "very vertical" (UNlike the httpdisk approach that can potentially get *anything* from *any* .iso), you analyzed a set of specific "full" downloads and created this thingy that is able to replicate the very specific "relevant" part.

Maybe something more "wide scoped" could be of use....

As an only seemingly UNrelated example, see how a little, very specific tool/approach was later made into a more "general" approach:

http://www.911cd.net/forums//index.php?showtopic=16745

jaclaz

0

Share this post


Link to post
Share on other sites

Thanks guy, good to hear it works!

Could we get the "initial" part of *any* .iso and analyze it with isoinfo or a similar tool (to get a specific file address/offset/etc.)?

Well it would properly be possible, but would need an CDFS expert to know how much form the beginning of the ISO is needed.

If one of these ISO-tools receive the absolute/relative offset and filesize it could be passed to cURL.

cheers.gif

Edited by JFX
0

Share this post


Link to post
Share on other sites

Well it would properly be possible, but would need an CDFS expert to know how much form the beginning of the ISO is needed.

It's not that easy, but the "theory of operation" is not particularly complex, some parsing is needed, biut it shouldn't be that bad.

I don't want to hijack (too much) this thread, I will PM you some data.

jaclaz

0

Share this post


Link to post
Share on other sites

BTW: its possible to do download a byte range in autoit without using cURL

working for me.

Full code attached.

Thanks again! Great idea!

Homes32

Edit: modified to fix download limited to first 8KB

Edit: modified again to include a crude example of how progress information can be obtained.

Edit: yet again. Made the progress example not suck as much! :)

Edit: 5/31/12 - Fixes for reading download stream.

GetHTTP.rar

Edited by Homes32
0

Share this post


Link to post
Share on other sites

BTW: its possible to do download a byte range in autoit without using cURL

hi Homes32,

I don't want to hijack (too much) this thread

And this NICE tool. You can perhaps use the BBCode

for your au3 code.

I did not use cURL before, it seems very complete and powerful :)

cheers.gif

0

Share this post


Link to post
Share on other sites

Thanks Homes32,

it seems to work, but I only receive the first 8KB of Neutral.cab.

And then get: "This handle value has been terminated."

cheers.gif

Edited by JFX
0

Share this post


Link to post
Share on other sites

Thanks Homes32,

it seems to work, but I only receive the first 8KB of Neutral.cab.

And then get: "This handle value has been terminated."

cheers.gif

sorry about that. I forgot to set the number of bytes to read. (default is 8KB)

fixed and updated original post.

as a nice effect now you should be able to use $aNumberOfBytesToRead[2] and $aNumberOfBytesToRead[1] to calculate download progress! :)

Regards,

Homes32

Edited by Homes32
0

Share this post


Link to post
Share on other sites

updated with fancy new progress demo!

this is fun! :)

post-355893-0-34592700-1338414049_thumb.

Edited by Homes32
0

Share this post


Link to post
Share on other sites

updated with fancy new progress demo!

this is fun! :)

Works well, thanks for the code :)

JFX, In GetWaikTools the files F1_imagex, ... are not renamed or overwritten at the second pass.

0

Share this post


Link to post
Share on other sites

updated with fancy new progress demo!

this is fun! :)

That's great work :thumbup Thanks!

I have integrated your code, cURL.exe is no longer needed but can be copied next to the tool, to be used.

@Chris

Thanks for the report, should be fixed now.

cheers.gif

Edited by JFX
0

Share this post


Link to post
Share on other sites

updated with fancy new progress demo!

this is fun! :)

That's great work :thumbup Thanks!

I have integrated your code, cURL.exe is no longer needed but can be copied next to the tool, to be used.

@Chris

Thanks for the report, should be fixed now.

cheers.gif

Hi JFX,

Looking good! :)

I updated my post above to include some important fixes for the data stream reading to be more reliable and so the number of bytes read gets reported correctly. previously it was possible to get a finished percentage of over 100%. also added better detection of incorrect range inputs and byte ranges for the 6 Win8 cabs. I noticed that these didn't have the same download GUI as the others so I figured you were downloading them different. this way you can download everything with the same functions/GUI and provide a consistent user experience. (you could also use InetGetSize() to calculate automatically but I have found its not always reliable)

Something to consider is you may want to add a switch to use cURL instead of just looking to see if it's in the folder.

I say this because in the case of winbuilder projects its possible that if this tool is extracted to %Tools% and cURL.exe exists there for some other process the user may experience unexpected/unwanted results.

Excellent work. always a pleasure working with you!

Homes32

0

Share this post


Link to post
Share on other sites

can you update it for the Win 8 RP ADK?

0

Share this post


Link to post
Share on other sites

can you update it for the Win 8 RP ADK?

did they even release a new ADK? The links on msdn still point to the consumer preview version published in feb.

0

Share this post


Link to post
Share on other sites

@Homes32

Thanks, looks much better now. :)

Added more command line options, see: GetWaikTools -?

can you update it for the Win 8 RP ADK?

Already done.

cheers.gif

Edited by JFX
0

Share this post


Link to post
Share on other sites

can you update it for the Win 8 RP ADK?

Already done.

cheers.gif

You're great. Thanks :thumbup

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.