[Powershell -Command " " is to execute Powershell Function Within the Batch script] PS C:\> Get-Help Get-WindowsImage NAME Get-WindowsImage SYNTAX Get-WindowsImage -ImagePath <string> [-LogPath <string>] [-ScratchDirectory <string>] [-LogLevel {Errors | Warnings | WarningsInfo}] [<CommonParameters>] Get-WindowsImage -ImagePath <string> -Name <string> [-LogPath <string>] [-ScratchDirectory <string>] [-LogLevel {Errors | Warnings | WarningsInfo}] [<CommonParameters>] Get-WindowsImage -ImagePath <string> -Index <uint32> [-LogPath <string>] [-ScratchDirectory <string>] [-LogLevel {Errors | Warnings | WarningsInfo}] [<CommonParameters>] Get-WindowsImage -Mounted [-LogPath <string>] [-ScratchDirectory <string>] [-LogLevel {Errors | Warnings | WarningsInfo}] [<CommonParameters>] Powershell -Command "Get-WindowsImage -ImagePath '%~dp0Win10\sources\install.wim'"
OK. You was first again. But I'm already have my variant: PowerShell Code: Get-WindowsImage -ImagePath "D:\MSMG\DVD\sources\install.wim" Code: ImageIndex : 1 ImageName : Windows 10 Корпоративная ImageDescription : Windows 10 Корпоративная ImageSize : 11,485,689,449 bytes --------------- Wait a minute, then I'll try your commands. UPD: OK, nothing helpfull any more. The command works with *.wim or *.vhd and can't get info about ISO. Will try this stupid "Windows 10 Корпоративная"
1) Exactly same errors as before: - Or Index, or Name is required, not both. - Some source file were not found. (See above my first post with log). 2) If you clearing User's Temp folder, then only files should be deleted, but not the folder itself. Or the repeated launch without reboot may fail.
Now I can't clear/delete folders and files inside the User's Temp: Code: %USERNAME%\AppData\Local\Temp\Mount The folder is locked and full of garbage. This is very bad situation for anybody. (But that was temporary installation and I can reinstall this machine) Be careful, my friend. UPD: Changing folder security from Thrustedinstaller to User Admin account worked. The Mount folder was cleared successfully.
May be a good way would be integration of your ideas just into the MSMG? Some kind like "Advanced options" for MSMG. MSMG have no issues when working with folders, security permissions, localizations, etc. Think about it.
if you already have a single index wim then why dont you skip exporting it. just skip it & second move option too . theres no any need to export a single index un serviced wim . Please try to understand the ethics.
if you terminated the script process in between after mounting the wim image then you have to dismount it first & if dismount dont work then clear the corrupt mount points & your mount directory will be empty by itself . please try to understand the ethics first of servicing a wim image .
i dont have any issue if msmg wants to use powershell functions within his script. he is most welcome to use any of the coding functions of my script but still i think he already knows all these powershell functions .
I'm a very new with modding an images. So no idea, what parameters are necessary and what are not. My ethics is the next: you are the coder here, so it's you who gets the knockouts OK. The next part when -SourceName 'Windows 10 Pro' has been removed: Code: --- Exporting Windows 10 Pro Index From Source Wim Image to Temporary Directory Export-WindowsImage : It is not possible to resolve a set of parameters using the specified named parameters. line:1 symbol:1 + Export-WindowsImage -SourceImagePath 'D:\W10DBL\Win10\sources\install ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Export-WindowsImage], ParameterBindingException + FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.Dism.Commands.ExportWindowsImageCommand --- Moving Back Exported WIM Image to its Source Path It is impossible to find the specified file. Nevertheless, the scenario finished till the end. (I'm just closed windows one by one)
Please, give me a command to unmount - to be launched malually, not in the script context. Next time I'll try to unmount before changing the folder permissions, that should be much faster to delete a garbage (if any error).
Try Code: dism.exe /cleanup-wim at the command line with Admin rights. This will try to cleanup stale files and unmount leftovers.
Most Welcome @zero cool root Please Suggest Any Kind of Improvement you want to be implemented in the script to make this project more user friendly. Please Also Review your Experience After Installing Final Debloated ISO as a Guest Machine on any VM App.
@mdl052020 1) For me it worked like this (without errors): Code: Powershell -Command "Export-WindowsImage -SourceImagePath '%~dp0Win10\sources\install.wim' -SourceIndex 1 -DestinationImagePath '%tmp%\install.wim'" where -SourceIndex N is a must parameter for the Export-WindowsImage command For example, you may show to the user the list of Editions first (smth. like that): Code: Powershell -Command "Get-WindowsImage -ImagePath '%~dp0Win10\sources\install.wim'" And then ask the user input a number of the image (for exporting, moving, etc.) 2) Reminding you. As I said before: If you clearing User's Temp folder, then only files should be deleted, but not the folder itself. After script exit, the User's Temp folder appears deleted, so if I want to use 7-Zip app, for example, nothing can be extracted (system error). 3) Some DISM errors from the system dism.log (no idea whether they are critical or not): Spoiler Code: Info DISM API: PID=8 TID=2052 Lookup in table by path failed for: DummyPath-2BA51B78-C7F7-4910-B99D-BB7345357CDC - CTransactionalImageTable::LookupImagePath ... Info DISM API: PID=8 TID=2052 Lookup in table by path failed for: 1376341382_851968_23412 - CTransactionalImageTable::LookupImagePath Info DISM API: PID=8 TID=2052 Lookup in table by path failed for: 1376341382_851968_23412 - CTransactionalImageTable::LookupImagePath ... Info DISM DISM Provider Store: PID=8 TID=1108 Failed to get and initialize the PE Provider. Continuing by assuming that it is not a WinPE image. - CDISMProviderStore::Final_OnConnect ... Info DISM API: PID=1444 TID=5960 Lookup in table by path failed for: DummyPath-2BA51B78-C7F7-4910-B99D-BB7345357CDC - CTransactionalImageTable::LookupImagePath ... Info DISM API: PID=6072 TID=3136 Lookup in table by path failed for: 1376341382_851968_23412 - CTransactionalImageTable::LookupImagePath ... Warning DISM DISM Provider Store: PID=6072 TID=6024 Failed to load the provider: C:\Windows\SYSTEM32\Dism\SiloedPackageProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e) ... Warning DISM DISM Provider Store: PID=6072 TID=6024 Failed to load the provider: C:\Windows\SYSTEM32\Dism\MetaDeployProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e) ... Warning DISM Provider Store: PID=4980 TID=2304 Failed to load the provider: C:\Users\TMP\AppData\Local\Temp\62EDDD54-CBAF-4C23-9A9F-89F9968C0B70\PEProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e) ... Info CBS Failed to find a matching version for servicing stack: C:\Users\TMP\AppData\Local\Temp\Mount\Windows\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.19041.504_none_e781e76525fb2269\ [HRESULT = 0x80070490 - ERROR_NOT_FOUND]
IDK why You are Trying to Export a Single Index Wim Image , Please Learn Basics of Wim Servicing. Info CBS Failed to find a matching version for servicing stack: C:\Users\TMP\AppData\Local\Temp\Mount\Windows\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.19041.504_none_e781e76525fb2269\ [HRESULT = 0x80070490 - ERROR_NOT_FOUND] This One is Important HRESULT = 0x80070490 ( This is Regarding The Wim You Were Servicing Very Important )
I just worried about other people want to use your script. (I remember you said I can skip this step, same as moving back an exported WIM). What I should do in this case? (I'm still want we achieve a healthy work in general, before I start cutting the packs). If you have some recommendations for me, I would be appreciated
1) Source (like adguard or so) : 2004 build 19041.508 Original Microsoft MSDN [RU] with integrated updates 2) MSMG 3) Your script I looked at that: Original Microsoft MSDN and decided this is a good distributive to start modding... UPD: I tried to check with manual update and Windows said KB4577266 (Last SSU) is already installed. So it is already here.