1 vote
closed
AIK/OPK path is hard-coded

Description

 
Repurposing this bug.

The AIK/OPK paths are hard-coded to be %systemdrive%\program files\windows [aik/opk]. This works *most* of the time.
At a minimum, the code should look in %programfiles%\windows [aik/opk].

It may also make more sense to parse the %path% variable and include each of those directories in the binary search.
This still won't solve the issue, but it opens up an easy workaround - use the Deployment Tools command prompt.


---------------Original-----------------
Hi,
I'm trying to create a VHD using VIM2VHD
I get the following error :
*******************************************************************************
Error: 0: No filePath was specified. This file was marked as critical.
Script execution will now halt.
*******************************************************************************
WARNING: An error occurred. To help with troubleshooting, temporary files have
not been deleted. You can find your log files in:
null
Summary: Errors: 1, Warnings: 1, Successes: 0
INFO: Done.

And here's the line I'm using: D:\Test>cscript WIM2VHD.wsf /wim:w:\sources\install.wim /sku:ultimate
The source is Windows 7 7077 x86
Imagex has no problem
What do I do wrong ?
Thanks

File Attachments


No files are attached


Closed May 18 2009 at 10:08 PM  by mikekol
This has been fixed post-RC.

The fix is in two parts:

1) Instead of assuming that Program Files lives on %SystemDrive%, we now get binaries from a subfolder of %ProgramFiles%. This should fix any issues where Program Files is redirected by the operating system.

2) As a last resort, WIM2VHD will scan every folder in the %PATH% for the binaries it needs. You can run WIM2VHD from the Deployment Tools Command Prompt (should be part of the OPK or WAIK), and WIM2VHD will be able to find the binaries it needs.

Thanks, and I hope this works for you!

Comments

most recent at top (show oldest at top)
mikekol wrote Apr 24 2009 at 5:06 PM
No worries Jeff - thanks for posting.
And yes, as you saw in the script, the path to the AIK/OPK is sort of hard-coded into the script (though, the path is based on the %systemdrive% variable).

I'm getting ready to release the RC version of WIM2VHD, and I don't want to change anything right now (just went through all the test passes), but I'll log a bug to look at changing this behavior for RTW or for the next version.

Thanks!

JeffAprea wrote Apr 24 2009 at 7:33 AM
OK, it was my Antivirus..... Sorry for disturbing

JeffAprea wrote Apr 24 2009 at 7:20 AM
Maybe it's my antivirus.... Sorry, I'm posting as is...

JeffAprea wrote Apr 24 2009 at 7:20 AM
Now I get the following problem :
D:\Test>cscript WIM2VHD.wsf /wim:w:\sources\install.wim /sku:ultimate
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

Windows(R) Image to Virtual Hard Disk (WIM2VHD) Converter BETA
Copyright (C) Microsoft Corporation. All rights reserved.
Version 6.1.7033.1

Check for updates at http://code.msdn.microsoft.com/wim2vhd!

MACHINE INFO:
Build=7077
Platform=x86fre
OS=Windows 7 Ultimate
ServicePack=
Version=6.1
BuildLab=winmain_win7rc
BuildDate=090404-1255
Language=en-US

INFO: Session key is 1C37D095-E7D6-46BD-A8C6-97B980C74C1C
INFO: Inspecting the WIM...
INFO: Configuring and formatting the VHD...
INFO: Applying the WIM...
Progress: 72%, 2:32 mins remaining
*******************************************************************************
Error: 0: Command "C:\Softs\Microsoft\Windows AIK\Tools\x86\imagex.exe /scroll /
apply "W:\sources\install.wim" 5 C:\Users\CSG\AppData\Local\Temp\WIM2VHD.WSF\1C3
7D095-E7D6-46BD-A8C6-97B980C74C1C\mount\ /norpfix " exited with error code 2:

Progress: 0%Progress: 1%Progress: 2%Progress: 3%Progress: 4%, 4:24 mins remainin
gProgress: 5%, 4:34 mins remainingProgress: 6%, 4:45 mins remainingProgress: 7%,
4:56 mins remainingProgress: 8%, 5:09 mins remainingProgress: 9%, 5:11 mins rem
ainingProgress: 10%, 5:25 mins remainingProgress: 11%, 5:38 mins remainingProgre
ss: 12%, 5:45 mins remainingProgress: 13%, 5:57 mins remainingProgress: 14%, 5:5
7 mins remainingProgress: 15%, 5:46 mins remainingProgress: 16%, 5:34 mins remai
ningProgress: 17%, 5:20 mins remainingProgress: 18%, 5:05 mins remainingProgress
: 19%, 4:56 mins remainingProgress: 20%, 4:53 mins remainingProgress: 21%, 4:47
mins remainingProgress: 22%, 4:42 mins remainingProgress: 23%, 4:42 mins remaini
ngProgress: 24%, 4:44 mins remainingProgress: 25%, 4:45 mins remainingProgress:
26%, 4:48 mins remainingProgress: 27%, 4:50 mins remainingProgress: 28%, 4:48 mi
ns remainingProgress: 29%, 4:41 mins remainingProgress: 30%, 4:39 mins remaining
Progress: 31%, 5:02 mins remainingProgress: 32%, 5:29 mins remainingProgress: 33
%, 5:40 mins remainingProgress: 34%, 5:46 mins remainingProgress: 35%, 5:49 mins
remainingProgress: 36%, 5:45 mins remainingProgress: 37%, 5:35 mins remainingPr
ogress: 38%, 5:25 mins remainingProgress: 39%, 5:15 mins remainingProgress: 40%,
5:07 mins remainingProgress: 41%, 5:04 mins remainingProgress: 42%, 5:00 mins r
emainingProgress: 43%, 4:56 mins remainingProgress: 44%, 4:53 mins remainingProg
ress: 45%, 4:50 mins remainingProgress: 46%, 4:44 mins remainingProgress: 47%, 4
:39 mins remainingProgress: 48%, 4:36 mins remainingProgress: 49%, 4:30 mins rem
ainingProgress: 50%, 4:25 mins remainingProgress: 51%, 4:18 mins remainingProgre
ss: 52%, 4:10 mins remainingProgress: 53%, 4:02 mins remainingProgress: 54%, 3:5
3 mins remainingProgress: 55%, 3:45 mins remainingProgress: 56%, 3:37 mins remai
ningProgress: 57%, 3:28 mins remainingProgress: 58%, 3:24 mins remainingProgress
: 59%, 3:23 mins remainingProgress: 60%, 3:15 mins remainingProgress: 61%, 3:20
mins remainingProgress: 62%, 3:20 mins remainingProgress: 63%, 3:17 mins remaini
ngProgress: 64%, 3:12 mins remainingProgress: 65%, 3:07 mins remainingProgress:
66%, 3:03 mins remainingProgress: 67%, 3:00 mins remainingProgress: 68%, 2:55 mi
ns remainingProgress: 69%, 2:51 mins remainingProgress: 70%, 2:45 mins remaining
Progress: 71%, 2:39 mins remainingProgress: 72%, 2:32 mins remaining[Error: 5] C
:\Users\CSG\AppData\Local\Temp\WIM2VHD.WSF\1C37D095-E7D6-46BD-A8C6-97B980C74C1C\
mount\Windows\winsxs\x86_prnep00a.inf_31bf3856ad364e35_6.1.7077.0_none_c118b8ffd
1c63b1d\I386\EP0NM400.DLL. [ResourceExtractToFileByStruct: (seq. 30) -> CreateFi
le fai[Error: 5] C:\Users\CSG\AppData\Local\Temp\WIM2VHD.WSF\1C37D095-E7D6-46BD-
A8C6-97B980C74C1C\mount\Windows\winsxs\x86_prnep00a.inf_31bf3856ad364e35_6.1.707
7.0_none_c118b8ffd1c63b1d\I386\EP0NM400.DLL. [ResourceExtractToFileByStruct: (se
q. 50) -> Uncompress or [Error: 5] C:\Users\CSG\AppData\Local\Temp\WIM2VHD.WSF\1
C37D095-E7D6-46BD-A8C6-97B980C74C1C\mount\Windows\winsxs\x86_prnep00a.inf_31bf38
56ad364e35_6.1.7077.0_none_c118b8ffd1c63b1d\I386\EP0NM400.DLLError restoring ima
ge.Access is denied.
*******************************************************************************
INFO: Unmounting the VHD due to error...
WARNING: An error occurred. To help with troubleshooting, temporary files have
not been deleted. You can find your log files in:
C:\Users\CSG\AppData\Local\Temp\WIM2VHD.WSF\1C37D095-E7D6-46BD-A8C6-97B980C74C1C

Summary: Errors: 1, Warnings: 1, Successes: 0
INFO: Done.

D:\Test>

JeffAprea wrote Apr 24 2009 at 6:42 AM
OK, I changed the path in the script and it's ok now :)

JeffAprea wrote Apr 24 2009 at 6:38 AM
Is it just a question of path variable or is the path hard coded ?

JeffAprea wrote Apr 24 2009 at 6:36 AM
Yes, I usually install every software in a directory called Softs... Is it the problem ?
I'm gonna reinstall Windows AIK in Program Files.

mikekol wrote Apr 24 2009 at 1:43 AM
Do you have the AIK or OPK installed somewhere other than %systemdrive%\Program Files\Windows AIK (or OPK)?


Updating...
Page view tracker