MysticFoxDE / WINDOWS-OPTIMIZATIONS

SKRIPTS FOR WINDOWS DESUBOPTIMIZATION
606 stars 54 forks source link

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

Open hvoges opened 1 year ago

hvoges commented 1 year ago

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 commented 11 months ago

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 commented 11 months ago

Hi Alex,

you could simply add a log-command in the the Catch-Block. 😉

Greetings, Holger

Von: Alexander Fuchs @.> Gesendet: Montag, 7. August 2023 07:55 An: MysticFoxDE/WINDOWS-OPTIMIZATIONS @.> Cc: Holger Voges @.>; Author @.> Betreff: Re: [MysticFoxDE/WINDOWS-OPTIMIZATIONS] Error-Message when Registry-Key does not exist (Issue #21)

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

— Reply to this email directly, view it on GitHubhttps://github.com/MysticFoxDE/WINDOWS-OPTIMIZATIONS/issues/21#issuecomment-1667230367, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABRHIAFUBLOWA4EFTE4JPNTXUB7LPANCNFSM6AAAAAA2ACOFDA. You are receiving this because you authored the thread.Message ID: @.**@.>>