MSFN Forum: Get WAIK Tools w/o loading the huge ISO's - MSFN Forum

Jump to content


  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

Get WAIK Tools w/o loading the huge ISO's Rate Topic: -----

#1 User is offline   JFX 

  • Member
  • PipPip
  • Group: Members
  • Posts: 264
  • Joined: 17-January 11
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 30 May 2012 - 04:46 AM

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

For command line: GetWaikTools -?

Posted Image

This post has been edited by JFX: 09 March 2013 - 08:28 AM



#2 User is offline   CoffeeFiend 

  • Coffee Aficionado
  • Group: Super Moderator
  • Posts: 5,399
  • Joined: 14-July 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 30 May 2012 - 05:08 AM

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

#3 User is offline   wimb 

  • Senior Member
  • Group: Developers
  • Posts: 633
  • Joined: 21-March 07

Posted 30 May 2012 - 05:50 AM

Thanks for this very NICE Solution :)

:thumbup

This post has been edited by wimb: 30 May 2012 - 05:50 AM


#4 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,576
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 30 May 2012 - 06:42 AM

View PostCoffeeFiend, on 30 May 2012 - 05:08 AM, said:

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:

Quote

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 User is offline   JFX 

  • Member
  • PipPip
  • Group: Members
  • Posts: 264
  • Joined: 17-January 11
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 30 May 2012 - 07:29 AM

View Postjaclaz, on 30 May 2012 - 06:42 AM, said:

but this is easily correctable :).

Done.

View Postjaclaz, on 30 May 2012 - 06:42 AM, said:

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

This post has been edited by JFX: 09 March 2013 - 08:28 AM


#6 User is offline   Homes32 

  • Group: Members
  • Posts: 7
  • Joined: 30-May 12
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 30 May 2012 - 08:26 AM

very nice work! congrads on the release! :)

#7 User is offline   ChrisR 

  • Junior
  • Pip
  • Group: Members
  • Posts: 75
  • Joined: 27-May 10
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 30 May 2012 - 09:02 AM

Great, Very usefull tool :thumbup

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

This post has been edited by ChrisR: 30 May 2012 - 09:59 AM


#8 User is offline   ChrisR 

  • Junior
  • Pip
  • Group: Members
  • Posts: 75
  • Joined: 27-May 10
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 30 May 2012 - 09:58 AM

And thank you for the switches to be launched in command line B)
GetWaikTools.exe -?

Posted Image

#9 User is offline   Lancelot_Real 

  • Junior
  • Pip
  • Group: Members
  • Posts: 88
  • Joined: 14-November 07
  • OS:XP Pro x64
  • Country: Country Flag

Posted 30 May 2012 - 10:01 AM

As usual another masterpiece JFX :thumbup B)

#10 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,576
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 30 May 2012 - 10:01 AM

View PostJFX, on 30 May 2012 - 07:29 AM, said:

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 User is offline   JFX 

  • Member
  • PipPip
  • Group: Members
  • Posts: 264
  • Joined: 17-January 11
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 30 May 2012 - 10:41 AM

Thanks guy, good to hear it works!


View Postjaclaz, on 30 May 2012 - 10:01 AM, said:

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

This post has been edited by JFX: 09 March 2013 - 08:29 AM


#12 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,576
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 30 May 2012 - 12:38 PM

View PostJFX, on 30 May 2012 - 10:41 AM, said:

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 User is offline   Homes32 

  • Group: Members
  • Posts: 7
  • Joined: 30-May 12
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 30 May 2012 - 12:43 PM

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 File(s)


This post has been edited by Homes32: 31 May 2012 - 12:20 PM


#14 User is offline   ChrisR 

  • Junior
  • Pip
  • Group: Members
  • Posts: 75
  • Joined: 27-May 10
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 30 May 2012 - 01:20 PM

View PostHomes32, on 30 May 2012 - 12:43 PM, said:

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

hi Homes32,

View Postjaclaz, on 30 May 2012 - 12:38 PM, said:

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 User is offline   JFX 

  • Member
  • PipPip
  • Group: Members
  • Posts: 264
  • Joined: 17-January 11
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 30 May 2012 - 02:00 PM

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

This post has been edited by JFX: 09 March 2013 - 08:29 AM


#16 User is offline   Homes32 

  • Group: Members
  • Posts: 7
  • Joined: 30-May 12
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 30 May 2012 - 02:18 PM

View PostJFX, on 30 May 2012 - 02:00 PM, said:

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

This post has been edited by Homes32: 30 May 2012 - 02:26 PM


#17 User is offline   Homes32 

  • Group: Members
  • Posts: 7
  • Joined: 30-May 12
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 30 May 2012 - 03:34 PM

updated with fancy new progress demo!
this is fun! :)

Attached File(s)


This post has been edited by Homes32: 30 May 2012 - 03:40 PM


#18 User is offline   ChrisR 

  • Junior
  • Pip
  • Group: Members
  • Posts: 75
  • Joined: 27-May 10
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 30 May 2012 - 03:52 PM

View PostHomes32, on 30 May 2012 - 03:34 PM, said:

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 User is offline   JFX 

  • Member
  • PipPip
  • Group: Members
  • Posts: 264
  • Joined: 17-January 11
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 31 May 2012 - 04:56 AM

View PostHomes32, on 30 May 2012 - 03:34 PM, said:

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

This post has been edited by JFX: 09 March 2013 - 08:29 AM


#20 User is offline   Homes32 

  • Group: Members
  • Posts: 7
  • Joined: 30-May 12
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 31 May 2012 - 10:49 AM

View PostJFX, on 31 May 2012 - 04:56 AM, said:

View PostHomes32, on 30 May 2012 - 03:34 PM, said:

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

Share this topic:


  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy