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

Error-Message when Registry-Key does not exist #21

Open
hvoges opened this issue Jul 6, 2023 · 2 comments
Open

Error-Message when Registry-Key does not exist #21

hvoges opened this issue Jul 6, 2023 · 2 comments

Comments

@hvoges
Copy link

hvoges commented Jul 6, 2023

Hi Alexander,

thank you for your great script. I would recommend one improvement - can you please add a try-catch block around the "remove-item" to prevent powershell from throwing errors if the registry-keys don´t exit and write a message "key does not exit, ignoring setting" or something like that? I know powershell quite well, but a newbie might be confused by the messages. Also, a log-file which documents the changes might be helpful.

Thanks,
Holger

@MysticFoxDE
Copy link
Owner

Hi Holger,

Also, a log-file which documents the changes might be helpful.

look at the "WINDOWS10AND11-NETWORK-DESUBOPTIMIZATION.log" under "C:\BACKUP".

thank you for your great script. I would recommend one improvement - can you please add a try-catch block around the "remove-item" to prevent powershell from throwing errors if the registry-keys don´t exit and write a message "key does not exit, ignoring setting" or something like that?

If I hide this message, then it is not documented in the log mentioned above.

Best Regards
Alex

@hvoges
Copy link
Author

hvoges commented Aug 7, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants