Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: ERROR: Invalid syntax. Type "REG ADD /?" for usage. #380

Closed
guihkx opened this issue Jul 5, 2024 · 3 comments
Closed

[Bug]: ERROR: Invalid syntax. Type "REG ADD /?" for usage. #380

guihkx opened this issue Jul 5, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@guihkx
Copy link

guihkx commented Jul 5, 2024

Description

When applying the Disable Microsoft feature trials tweak from version 0.13.5, I got the following error:

--- Disable Microsoft feature trials
The operation completed successfully.
The operation completed successfully.
ERROR: Invalid syntax.
Type "REG ADD /?" for usage.

How can the bug be recreated?

  1. Apply the Disable Microsoft feature trials tweak

Operating system

Windows 11 Pro 24H2 (build 26100.1000)

Script file

No response

Screenshots

No response

Additional information

No response

@guihkx guihkx added the bug Something isn't working label Jul 5, 2024
@undergroundwires
Copy link
Owner

Thanks for the bug report @guihkx.

It's really helpful with all details you provide such as OS/app version.

I see that it was introduced as part of 0.13.4 due to a typo included in commit cec0b4b. It's due to /f flag incorrectly being /.

I will fix this by getting rid of all these manual reg add commands by replacing them with a common function like SetRegistryValue in windows.yaml. This way, the change will not only fix this bug but will prevent the code against this kind of typos again.

@guihkx
Copy link
Author

guihkx commented Jul 6, 2024

Superb! Thank you for looking into this so quickly. :)

undergroundwires added a commit that referenced this issue Jul 10, 2024
Start by changing compiler so having whitespace between `with`
statements do not result in arbitrary revert code.

- Fix incorrect revert codes (adding value instead of deleting) for:
  - `HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent!DisableSoftLanding`
  - `HKLM\Software\Policies\Microsoft\Windows\CloudContent!DisableWindowsConsumerFeatures`
  - `HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager!SubscribedContent-338393Enabled`
  - `HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager!SubscribedContent-353694Enabled`
  - `HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager!SubscribedContent-353696Enabled`
- This commit fixes also a typo in code, causing the
  `HKLM\SOFTWARE\Microsoft\PolicyManager\default\System\AllowExperimentation`
  registry key not being set. This resolves #380.
@undergroundwires
Copy link
Owner

Since 0.13.6, all registry operations are standardized/streamlined fixing this bug and preventing future bugs. I also added reversibility to everything possible. It was marathon going through all registry operations and testing but its done now 🚀🎉🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants