Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Can Convert-WindowsImage convert a .WIM from Command Prompt's "recimg" on Windows 8.1?

$
0
0

Hi Folks,

I have been trying to do this several times, including with the UI. The UI afforded a bit more info; it was complaining about the .WIM metadata:

**********************
Windows PowerShell transcript start
Start time: 20140121155929
Username : TammyLacey\Crysta T Lacey
Machine : TAMMYLACEY (Microsoft Windows NT 6.3.9600.0)
**********************
INFO : Launching UI...
INFO : Selected Working Directory is D:\Hyper-V\Virtual Hard Disks...
INFO : Scanning WIM metadata...
INFO : Scanning WIM metadata...
ERROR : You cannot call a method on a null-valued expression.
INFO : Log folder is C:\Users\CRYSTA~1\AppData\Local\Temp\Convert-WindowsImage\28986a7f-dc96-4ee6-91e2-b69b90a31153
INFO : Closing Windows image...
INFO : Done.
**********************
Windows PowerShell transcript end
End time: 20140121161513
**********************

With PowerShell: 

PS C:\Windows\system32> Convert-WindowsImage -SourcePath "E:\@.RefreshImage\2014-01-18\CustomRefresh.wim" -VHDPath "D:\Hyper-V\Virtual Hard Disks\W 8.1 Pro 1.vhdx" -Edition Professional -VHDFormat VHDX -Verbose -db

**********************
Windows PowerShell transcript start
Start time: 20140121092326
Username : TammyLacey\Crysta T Lacey
Machine : TAMMYLACEY (Microsoft Windows NT 6.3.9600.0)
**********************
DEBUG:
using System;

using System.Collections.Generic;

using System.Collections.ObjectModel;

using System.ComponentModel;

using System.Globalization;

using System.IO;

using System.Linq;

using System.Runtime.InteropServices;

using System.Security;

using System.Text;

using System.Text.RegularExpressions;

using System.Threading;

using System.Xml.Linq;

using System.Xml.XPath;

using Microsoft.Win32.SafeHandles;



namespace WIM2VHD {



/// <summary>

/// P/Invoke methods and associated enums, flags, and structs.

/// </summary>

public class

NativeMethods {



#region Delegates and Callbacks

#region WIMGAPI



///<summary>

///User-defined function used with the RegisterMessageCallback or UnregisterMessageCallback function.

///</summary>

///<param name="MessageId">Specifies the message being sent.</param>

///<param name="wParam">Specifies additional message information. The contents of this parameter depend on the
value of the

///MessageId parameter.</param>

///<param name="lParam">Specifies additional message information. The contents of this parameter depend on the
value of the

///MessageId parameter.</param>

///<param name="UserData">Specifies the user-defined value passed to RegisterCallback.</param>

///<returns>

///To indicate success and to enable other subscribers to process the message return WIM_MSG_SUCCESS.

///To prevent other subscribers from receiving the message, return WIM_MSG_DONE.

///To cancel an image apply or capture, return WIM_MSG_ABORT_IMAGE when handling the WIM_MSG_PROCESS message.

///</returns>

public delegate uint

WimMessageCallback(

uint MessageId,

IntPtr wParam,

IntPtr lParam,

IntPtr UserData

);



public static void

RegisterMessageCallback(

WimFileHandle hWim,

WimMessageCallback callback) {

>>>>>>>>>>>>>>>>>> I have the rest of the DEBUG your interested but it is over 4000 lines<<<<<<<<<<<<<<<

#endregion Public Properties

}



#endregion VHD Interop

}

Confirm
Continue with this operation?
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"):
VERBOSE: isUserAdmin? True
VERBOSE: isWindows8? True
VERBOSE: Temporary VHDX path is : D:\Hyper-V\Virtual Hard Disks\e53a41bc-6a5e-4d85-9b77-33d0e48b40b8.vhdx
ERROR : You cannot call a method on a null-valued expression.
INFO : Log folder is C:\Users\CRYSTA~1\AppData\Local\Temp\Convert-WindowsImage\e53a41bc-6a5e-4d85-9b77-33d0e48b40b8
INFO : Closing Windows image...
INFO : Done.
**********************
Windows PowerShell transcript end
End time: 20140121093332
**********************

Thank You,


Best Regards,

Crysta


PhotM Phantom of the Mobile


Viewing all articles
Browse latest Browse all 15028

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>