I also removed a bunch of stuff. Should I first remove what I need removed in version 8.8, Then reopen in 9.3 and convert it? Thanks for the kind reply MSMG. I have been using Windows 7 forever but need 8.1 for nvme support. budzos
First you use v9.3 to convert the edition and then re-open the image with v8.3 for removal. Will add a temporarily solution for component removal for W7/W81 in v9.4 using Remove Windows Component using Package List to avoid using two version of ToolKit.
Bahh i knew it i messed up ! I was running from IDE with working directory holding ps1 and reg files, not from command prompt (with usually workdir set to current user). It was working directory that may have messed things up. One other thing i didn't check for is result of $path = [System.IO.Path]::GetDirectoryName($file) it had a backslash. If file resides in root dir, it will have a backslash, but if that is some subdirectory it will not. This is relevant as the final filename is built with "\converted_" string inserted.
@MSMG i copied the PS code and modified it to ensure input arguments are properly defined at command line Code: # test if first argument is defined / given at command line if ($args[0] -eq $null) { # can be replaced with Exit 1 to denote failure if used in batch cmd throw [System.IO.DirectoryNotFoundException]::new("Source directory not defined !") } # test if first argument is a directory and exists if ((Test-Path -Path $args[0].ToString() -PathType Container) -eq $false) { throw [System.IO.DirectoryNotFoundException]::new("First argument is not a directory !") } # test if second argument is defined / given at command line if ($args[1] -eq $null) { throw [System.IO.DirectoryNotFoundException]::new("Target directory not defined !") } # test if second argument is a directory and exists if ((Test-Path -Path $args[1].ToString() -PathType Container) -eq $false) { throw [System.IO.DirectoryNotFoundException]::new("Second argument is not a directory !") } # using ToString() for arguments ensures that if supplied directory name is all numbers it won't fail (it won't think its a number but a string) # Combine() ensures that if directory path does not have backslash \ at end it will work anyway $sourcedir = [System.IO.Path]::Combine($args[0].ToString(),".\") + "\*" $targetdir = [System.IO.Path]::Combine($args[1].ToString(),".\") $input_values = Get-ChildItem -Path $sourcedir -Include *.reg #moved out of loop, no need to re-define it on each iteration :) [hashtable]$equivalents = @{ "[HKEY_LOCAL_MACHINE\SOFTWARE" = "[HKEY_LOCAL_MACHINE\TK_SOFTWARE"; "[-HKEY_LOCAL_MACHINE\SOFTWARE" = "[-HKEY_LOCAL_MACHINE\TK_SOFTWARE"; "[HKEY_CLASSES_ROOT" = "[HKEY_LOCAL_MACHINE\TK_SOFTWARE\Classes"; "[-HKEY_CLASSES_ROOT" = "[-HKEY_LOCAL_MACHINE\TK_SOFTWARE\Classes"; "[HKEY_LOCAL_MACHINE\SYSTEM" = "[HKEY_LOCAL_MACHINE\TK_SYSTEM"; "[-HKEY_LOCAL_MACHINE\SYSTEM" = "[-HKEY_LOCAL_MACHINE\TK_SYSTEM"; "[HKEY_CURRENT_USER" = "[HKEY_LOCAL_MACHINE\TK_NTUSER"; "[-HKEY_CURRENT_USER" = "[-HKEY_LOCAL_MACHINE\TK_NTUSER"; "[HKEY_USERS\.Default" = "[HKEY_LOCAL_MACHINE\TK_DEFAULT"; "[-HKEY_USERS\.Default" = "[-HKEY_LOCAL_MACHINE\TK_DEFAULT"} foreach ($file in $input_values) { #regex ensures that all commented lines are ignored [System.Collections.ArrayList]$content = Get-content -Path $file | Where { $_ -notmatch "^(\s+)?;|^\s*$" } [string]$output = "" [string]$newline = "" foreach($line in $content) { # regex ensures to catch all lines with angle brackets (they contain registry keys) if ($line -match "^\[.*\]$") { #search and replace keys to toolkit-compatible format foreach($key in $equivalents.Keys) { if ($line.Contains($key)) { $newline = $line.Replace($key, $equivalents[$key]) break } } } else { $newline = $line } $output += $newline + "`r`n" } # $file is of type System.IO.FileSystemInfo so it is simple as referencing its 'Name' property to get actual file name Set-Content -Path ($targetdir + $file.Name) -Value $output } Note the comments as they provide info on what is added and why.
Yes Finished uploading the packs, cleaning up the Toolkit script, updating the change-log and HASH. Still pending is to add protection to the ToolKitHelper.exe and re-test it, then pack up, upload and publish the ToolKit. Monday, 2 September is the release date.
I haven't been reading this thread for a long time since I use other software for this task but what happened with the GUI version? It was supposed to be released long time ago.
No not yet, will release the new version and then will try out different methods of component removal to see which is better one to retain WU working and also not to return the removed components for v19H1.