Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

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

- - - - -

  • Please log in to reply
79 replies to this topic

#1
JFX

JFX

    Advanced Member

  • Member
  • PipPipPip
  • 485 posts
  • Joined 17-January 11
  • OS:Windows 7 x64
  • Country: Country Flag

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

For command line: GetWaikTools -?

cheers.gif

Attached Files


Edited by JFX, 01 October 2014 - 08:46 AM.

  • Djago, ArkaNaskar23, quanganh2627 and 1 other like this


How to remove advertisement from MSFN

#2
CoffeeFiend

CoffeeFiend

    Coffee Aficionado

  • Super Moderator
  • 5,399 posts
  • Joined 14-July 04
  • OS:Windows 7 x64
  • Country: Country Flag
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).
Coffee: \ˈkȯ-fē, ˈkä-\. noun. Heaven in a cup. Life's only treasure. The meaning of life. Kaffee ist wunderbar. C8H10N4O2 FTW.

#3
wimb

wimb

    Senior Member

  • Developer
  • 679 posts
  • Joined 21-March 07
Thanks for this very NICE Solution :)

:thumbup

Edited by wimb, 30 May 2012 - 05:50 AM.

USB Booting - UEFI_MULTI

MBR-Backup - Make-PE3

--------------------

#4
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,812 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

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

#5
JFX

JFX

    Advanced Member

  • Member
  • PipPipPip
  • 485 posts
  • Joined 17-January 11
  • OS:Windows 7 x64
  • Country: Country Flag

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

Posted Image

Edited by JFX, 09 March 2013 - 08:28 AM.


#6
Homes32

Homes32
  • Member
  • 7 posts
  • Joined 30-May 12
  • OS:Windows 7 x64
  • Country: Country Flag
very nice work! congrads on the release! :)

#7
ChrisR

ChrisR

    Member

  • Member
  • PipPip
  • 221 posts
  • Joined 27-May 10
  • OS:Windows 7 x64
  • Country: Country Flag
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, 30 May 2012 - 09:59 AM.


#8
ChrisR

ChrisR

    Member

  • Member
  • PipPip
  • 221 posts
  • Joined 27-May 10
  • OS:Windows 7 x64
  • Country: Country Flag
And thank you for the switches to be launched in command line B)
GetWaikTools.exe -?

Posted Image

#9
Lancelot_Real

Lancelot_Real

    Junior

  • Member
  • Pip
  • 99 posts
  • Joined 14-November 07
  • OS:XP Pro x64
  • Country: Country Flag
As usual another masterpiece JFX :thumbup B)

#10
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,812 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

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...showtopic=16745

jaclaz

#11
JFX

JFX

    Advanced Member

  • Member
  • PipPipPip
  • 485 posts
  • Joined 17-January 11
  • OS:Windows 7 x64
  • Country: Country Flag
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.

Posted Image

Edited by JFX, 09 March 2013 - 08:29 AM.


#12
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,812 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

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

#13
Homes32

Homes32
  • Member
  • 7 posts
  • Joined 30-May 12
  • OS:Windows 7 x64
  • Country: Country Flag
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.

Attached Files


Edited by Homes32, 31 May 2012 - 12:20 PM.


#14
ChrisR

ChrisR

    Member

  • Member
  • PipPip
  • 221 posts
  • Joined 27-May 10
  • OS:Windows 7 x64
  • Country: Country Flag

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 [spoiler] for your au3 code.
I did not use cURL before, it seems very complete and powerful :)

Posted Image

#15
JFX

JFX

    Advanced Member

  • Member
  • PipPipPip
  • 485 posts
  • Joined 17-January 11
  • OS:Windows 7 x64
  • Country: Country Flag
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."

Posted Image

Edited by JFX, 09 March 2013 - 08:29 AM.


#16
Homes32

Homes32
  • Member
  • 7 posts
  • Joined 30-May 12
  • OS:Windows 7 x64
  • Country: Country Flag

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."

Posted Image

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, 30 May 2012 - 02:26 PM.


#17
Homes32

Homes32
  • Member
  • 7 posts
  • Joined 30-May 12
  • OS:Windows 7 x64
  • Country: Country Flag
updated with fancy new progress demo!
this is fun! :)

Attached Files


Edited by Homes32, 30 May 2012 - 03:40 PM.


#18
ChrisR

ChrisR

    Member

  • Member
  • PipPip
  • 221 posts
  • Joined 27-May 10
  • OS:Windows 7 x64
  • Country: Country Flag

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.

#19
JFX

JFX

    Advanced Member

  • Member
  • PipPipPip
  • 485 posts
  • Joined 17-January 11
  • OS:Windows 7 x64
  • Country: Country Flag

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.

Posted Image

Edited by JFX, 09 March 2013 - 08:29 AM.


#20
Homes32

Homes32
  • Member
  • 7 posts
  • Joined 30-May 12
  • OS:Windows 7 x64
  • Country: Country Flag


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.

Posted Image

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

#21
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,158 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

can you update it for the Win 8 RP ADK?
Posted Image

#22
Homes32

Homes32
  • Member
  • 7 posts
  • Joined 30-May 12
  • OS:Windows 7 x64
  • Country: Country Flag

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.

#23
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,158 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

yes, new ADK is out:

http://msdn.microsof...rdware/gg454513
Posted Image

#24
JFX

JFX

    Advanced Member

  • Member
  • PipPipPip
  • 485 posts
  • Joined 17-January 11
  • OS:Windows 7 x64
  • Country: Country Flag
@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.

Posted Image

Edited by JFX, 09 March 2013 - 08:29 AM.


#25
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,158 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator


can you update it for the Win 8 RP ADK?

Already done.

Posted Image


You're great. Thanks :thumbup
Posted Image




5 user(s) are reading this topic

0 members, 5 guests, 0 anonymous users