Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Legolash2o

win6x_registry_tweak

Recommended Posts


Has anyone asked himself, what this tool is doing? I don't understand fucking C# or Java but it looks crappy.

 

Why he is doing:

                if (_cmdLineArgs.ContainsKey('r'))                {                    if (Contains<string[], string>(Microsoft.Win32.Registry.LocalMachine.GetSubKeyNames(), HIVE_MOUNT_DIR))                    {                        Console.Write("Unmounting key...                        ");                        if (!UnloadHive(HIVE_MOUNT_POINT))                        {                            Console.ForegroundColor = ConsoleColor.Red;                            Console.WriteLine("FAIL");                            Console.WriteLine("You must unmount registry hive manually.");                            Console.WriteLine("Hit any key to close.");                            Console.ResetColor();                            Console.ReadKey();                            Environment.Exit(-3);                        }                        Console.ForegroundColor = ConsoleColor.Green;                        Console.WriteLine("OK");                        Console.ResetColor();                    }                    Console.Write("Removing \'Packages\'...                ");                    if (RemoveComponentSubkeys(_pkgDirectory + "Packages\\", _comp))                    {                        Console.ForegroundColor = ConsoleColor.Green;                        Console.WriteLine("OK");                        Console.WriteLine("Removed packages successfully.");                        Console.ResetColor();                    }                    Console.Write("Removing \'PackagesPending\'...         ");                    if (RemoveComponentSubkeys(_pkgDirectory + "Packages\\", _comp))                    {                        Console.ForegroundColor = ConsoleColor.Green;                        Console.WriteLine("OK");                        Console.WriteLine("Removed packages successfully.");                        Console.ResetColor();                    }                }

He removes packages by starting pkmgr twice, why? Why 800 lines for a few simple actions? It's doing it's work but it's outdated for win 8 and 10. But seriously, why removing twice?

Share this post


Link to post
Share on other sites

 

He removes packages by starting pkmgr twice, why? Why 800 lines for a few simple actions? It's doing it's work but it's outdated for win 8 and 10. But seriously, why removing twice?

Seriously, maybe - just maybe - "Packages" and "PackagesPending" are NOT exactly the same thing (and the second run is needed for the latter ones). :unsure:

 

jaclaz

Share this post


Link to post
Share on other sites

Has anyone asked himself, what this tool is doing? I don't understand f***ing C# or Java but it looks crappy.

Why he is doing:

                if (_cmdLineArgs.ContainsKey('r'))                {                    if (Contains<string[], string>(Microsoft.Win32.Registry.LocalMachine.GetSubKeyNames(), HIVE_MOUNT_DIR))                    {                        Console.Write("Unmounting key...                        ");                        if (!UnloadHive(HIVE_MOUNT_POINT))                        {                            Console.ForegroundColor = ConsoleColor.Red;                            Console.WriteLine("FAIL");                            Console.WriteLine("You must unmount registry hive manually.");                            Console.WriteLine("Hit any key to close.");                            Console.ResetColor();                            Console.ReadKey();                            Environment.Exit(-3);                        }                        Console.ForegroundColor = ConsoleColor.Green;                        Console.WriteLine("OK");                        Console.ResetColor();                    }                    Console.Write("Removing \'Packages\'...                ");                    if (RemoveComponentSubkeys(_pkgDirectory + "Packages\\", _comp))                    {                        Console.ForegroundColor = ConsoleColor.Green;                        Console.WriteLine("OK");                        Console.WriteLine("Removed packages successfully.");                        Console.ResetColor();                    }                    Console.Write("Removing \'PackagesPending\'...         ");                    if (RemoveComponentSubkeys(_pkgDirectory + "Packages\\", _comp))                    {                        Console.ForegroundColor = ConsoleColor.Green;                        Console.WriteLine("OK");                        Console.WriteLine("Removed packages successfully.");                        Console.ResetColor();                    }                }
He removes packages by starting pkmgr twice, why? Why 800 lines for a few simple actions? It's doing it's work but it's outdated for win 8 and 10. But seriously, why removing twice?

Maybe because he knows what he is doing?

Share this post


Link to post
Share on other sites

Has anyone asked himself, what this tool is doing? I don't understand f***ing C# or Java but it looks crappy.

 

Why he is doing:

He removes packages by starting pkmgr twice, why? Why 800 lines for a few simple actions? It's doing it's work but it's outdated for win 8 and 10. But seriously, why removing twice?

 

Troll does it work?

If you don't like don't use. Works for me for what I use it for. Yes its old but still working to get rid of Cortana.

I know a bit about programming and I can see what he's doing. Those twice you talk about Console.Write is just writing to screen so go hide behind a bush somewhere.

EDIT: And if you haven't messed with uninstalling Packages then yes you have Packages and Pending if you care to dig a little deeper

Edited by maxXPsoft

Share this post


Link to post
Share on other sites

@maxXPsoft

I think it's not correct, what he is doing. I mean only the lines:

if (RemoveComponentSubkeys(_pkgDirectory + "Packages\\", _comp))

it's redundant, i checked cbs.log and the pkgmgr.exe is executed twice, looks like:

CBS    pkgmgr called with: ""C:\Windows\System32\PkgMgr.exe" /up:Microsoft-OneCore-UserDataAccess-base-Package~31bf3856ad364e35~amd64~de-DE~10.0.10586.0 /norestart /quiet"CBS    Executing DISM: "C:\Windows\System32\dism.exe" /online /quiet /norestart /remove-package /packagename:"Microsoft-OneCore-UserDataAccess-base-Package~31bf3856ad364e35~amd64~de-DE~10.0.10586.0"CBS    Session: 30486761_3302727203 initialized by client DISM Package Manager Provider, external staging directory: (null)CBS    Failed to internally open package. [HRESULT = 0x800f0805 - CBS_E_INVALID_PACKAGE]CBS    Failed to OpenPackage using worker session [HRESULT = 0x800f0805]CBS    Dism.exe returned: -2146498555CBS    pkgmgr return code: 0x800f0805CBS    CBS    pkgmgr called with: ""C:\Windows\System32\PkgMgr.exe" /up:Microsoft-OneCore-UserDataAccess-base-Package~31bf3856ad364e35~amd64~~10.0.10586.0 /norestart /quiet"CBS    Executing DISM: "C:\Windows\System32\dism.exe" /online /quiet /norestart /remove-package /packagename:"Microsoft-OneCore-UserDataAccess-base-Package~31bf3856ad364e35~amd64~~10.0.10586.0"CBS    Session: 30486761_3310229223 initialized by client DISM Package Manager Provider, external staging directory: (null)CBS    Failed to internally open package. [HRESULT = 0x800f0805 - CBS_E_INVALID_PACKAGE]CBS    Failed to OpenPackage using worker session [HRESULT = 0x800f0805]CBS    Dism.exe returned: -2146498555CBS    pkgmgr return code: 0x800f0805CBS    CBS    pkgmgr called with: ""C:\Windows\System32\PkgMgr.exe" /up:Microsoft-OneCore-UserDataAccess-net-Package~31bf3856ad364e35~amd64~de-DE~10.0.10586.0 /norestart /quiet"CBS    Executing DISM: "C:\Windows\System32\dism.exe" /online /quiet /norestart /remove-package /packagename:"Microsoft-OneCore-UserDataAccess-net-Package~31bf3856ad364e35~amd64~de-DE~10.0.10586.0"CBS    Session: 30486761_3317571839 initialized by client DISM Package Manager Provider, external staging directory: (null)CBS    Failed to internally open package. [HRESULT = 0x800f0805 - CBS_E_INVALID_PACKAGE]CBS    Failed to OpenPackage using worker session [HRESULT = 0x800f0805]CBS    Dism.exe returned: -2146498555CBS    pkgmgr return code: 0x800f0805CBS    CBS    pkgmgr called with: ""C:\Windows\System32\PkgMgr.exe" /up:Microsoft-OneCore-UserDataAccess-net-Package~31bf3856ad364e35~amd64~~10.0.10586.0 /norestart /quiet"CBS    Executing DISM: "C:\Windows\System32\dism.exe" /online /quiet /norestart /remove-package /packagename:"Microsoft-OneCore-UserDataAccess-net-Package~31bf3856ad364e35~amd64~~10.0.10586.0"CBS    Session: 30486761_3324918383 initialized by client DISM Package Manager Provider, external staging directory: (null)CBS    Failed to internally open package. [HRESULT = 0x800f0805 - CBS_E_INVALID_PACKAGE]CBS    Failed to OpenPackage using worker session [HRESULT = 0x800f0805]CBS    Dism.exe returned: -2146498555CBS    pkgmgr return code: 0x800f0805

That's the log of second run. It can't remove the packages, 'cause they get removed in first run. There are no pending packages you can remove. Windows sets a removed package's state to "pending" and removes it once it's possible. online after restarts and offline after installation or perhaps after rebuild. imo

Share this post


Link to post
Share on other sites

@maxXPsoft

I think it's not correct, what he is doing. I mean only the lines:

 

I see differences in package names look closer

Microsoft-OneCore-UserDataAccess-base-Package~31bf3856ad364e35~amd64~de-DE~10.0.10586.0

Microsoft-OneCore-UserDataAccess-base-Package~31bf3856ad364e35~amd64~~10.0.10586.0

 

Microsoft-OneCore-UserDataAccess-net-Package~31bf3856ad364e35~amd64~de-DE~10.0.10586.0

Microsoft-OneCore-UserDataAccess-net-Package~31bf3856ad364e35~amd64~~10.0.10586.0

 

If you specify full name it will only remove the one, if you say Microsoft-OneCore-UserDataAccess it will get both

 

I use Microsoft-Windows-Search2 it removes 12 packages

Edited by maxXPsoft

Share this post


Link to post
Share on other sites

*facepalm* :D

 

It's only a snapshot. On the top you would find something like:

dism /online /remove-package:Microsoft-OneCore-UserDataAccess-net-Package~31bf3856ad364e35~amd64~de-DE~10.0.10586.0.Dism.exe returned: OK

.

and at the bottom:

CBS    pkgmgr called with: ""C:\Windows\System32\PkgMgr.exe" /up:Microsoft-OneCore-UserDataAccess-net-Package~31bf3856ad364e35~amd64~de-DE~10.0.10586.0 /norestart /quiet"CBS    Executing DISM: "C:\Windows\System32\dism.exe" /online /quiet /norestart /remove-package /packagename:"Microsoft-OneCore-UserDataAccess-net-Package~31bf3856ad364e35~amd64~de-DE~10.0.10586.0"CBS    Session: 30486761_3317571839 initialized by client DISM Package Manager Provider, external staging directory: (null)CBS    Failed to internally open package. [HRESULT = 0x800f0805 - CBS_E_INVALID_PACKAGE]CBS    Failed to OpenPackage using worker session [HRESULT = 0x800f0805]CBS    Dism.exe returned: -2146498555CBS    pkgmgr return code: 0x800f0805

Try it. Remove random package with install_wim_tweak and inspect c:\windows\logs\cbs\cbs.log.

Edited by Trolleule

Share this post


Link to post
Share on other sites

So do not wait for an answer developers, thanks to already understand itself.

If you like to work on a Windows 10, and Windows 8.1 computer has an error occurs in the tweak.exe
Added command line option ( /x ) which specifies the path to the pkgmgr.exe to properly remove the components.

 

wim_tweak.en.NET3.5.zip  wim_tweak.en.NET4.6.1.zip

 

source codes and files on mega - https://mega.nz/#F!fAVnxDAL!sZ26163s2UuJ2E3ODDdSaw

 

Так и не дождался ответа разработчиков, спасибо, уже сам разобрался.
 

Если например работать с образом Windows 10, а на компьютере установлен Windows 8.1 то возникают ошибки в работе tweak.exe
Добавлен ключ командной строки ( /x ) который указывает путь к "правильному"  pkgmgr.exe для корректного удаления компонентов.
Так же утилита полностью переведена на русский язык, включая исправленную и дополненную справку.

 

wim_tweak.ru.NET3.5.zip  wim_tweak.ru.NET4.6.1.zip

 

исходники и файлы на mega - https://mega.nz/#F!fAVnxDAL!sZ26163s2UuJ2E3ODDdSaw

Edited by supermanmd
  • Like 1
  • Upvote 1

Share this post


Link to post
Share on other sites

supermanmd

 

There is nothing to fix. When you remove packages, they won't remove immediately. Windows set it's state to 'PackagesPending' -> they will be removed on Installation. Only some smaller packages will be removed without getting pending state -> that's the reason why 'FAIL - Key not exist' message appears.

Share this post


Link to post
Share on other sites

There is another problem with this tool:

 

The owners key of every package has to be deleted to remove a package, otherwise you will get a "access denied" error, but thats not the problem. The problem is, that it not recover the owners key after removing packages! 

 

So you won't be able to enable Net Framework 3.5 after using install_wim_tweak and this may be for other features too.

Share this post


Link to post
Share on other sites

There is another problem with this tool:

 

The owners key of every package has to be deleted to remove a package, otherwise you will get a "access denied" error, but thats not the problem. The problem is, that it not recover the owners key after removing packages! 

 

So you won't be able to enable Net Framework 3.5 after using install_wim_tweak and this may be for other features too.

 

You must be an MS Troll or you screwed your system up so bad

BS I install 3.5

Once again, DON'T USE IT. I don't have any problems with it. Does what I need it to do, remove Cortana and Edge when I was using Pro

We have discovered that you might need to use Github method first

as noted here http://www.msfn.org/board/topic/174344-uninstall-cortana-from-windows-10/

Edited by maxXPsoft

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...