From ce7cca7601a791395ebaee0ad92f4839a54da934 Mon Sep 17 00:00:00 2001 From: Mohamed Diaby Date: Fri, 25 Oct 2019 11:55:31 +0300 Subject: [PATCH 1/4] Typos in WuAgent.cs Fixed some comment typos --- wumgr/WuAgent.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/wumgr/WuAgent.cs b/wumgr/WuAgent.cs index aafef77..66e1e24 100644 --- a/wumgr/WuAgent.cs +++ b/wumgr/WuAgent.cs @@ -67,7 +67,7 @@ public WuAgent() mUpdateSession = new UpdateSession(); mUpdateSession.ClientApplicationID = Program.mName; - //mUpdateSession.UserLocale = 1033; // alwys show strings in englisch + //mUpdateSession.UserLocale = 1033; // always show strings in english mUpdateServiceManager = new UpdateServiceManager(); @@ -266,7 +266,7 @@ private RetCodes ClearOffline() { if (mOfflineService != null) { - // note: if we keep references to updates reffering to an removed service we may got a crash + // note: if we keep references to updates reffering to a removed service we may get a crash foreach (MsUpdate Update in mUpdateHistory) Update.Invalidate(); foreach (MsUpdate Update in mPendingUpdates) @@ -526,7 +526,7 @@ public RetCodes UnInstallUpdatesManually(List Updates) return RetCodes.InProgress; } - void DownloadsFinished(object sender, UpdateDownloader.FinishedEventArgs args) // "manuall" mode + void DownloadsFinished(object sender, UpdateDownloader.FinishedEventArgs args) // "manual" mode { if (mCurOperation == AgentOperation.CancelingOperation) { @@ -539,7 +539,7 @@ void DownloadsFinished(object sender, UpdateDownloader.FinishedEventArgs args) / AppLog.Line("wsusscn2.cab downloaded"); RetCodes ret = ClearOffline(); - if (ret == RetCodes.Success) + if (ret == RetCodes.Success)l ret = SetupOffline(); if (ret == RetCodes.Success) ret = SearchForUpdates(); @@ -593,7 +593,7 @@ void DownloadProgress(object sender, ProgressArgs args) OnProgress(args.TotalCount, args.TotalPercent, args.CurrentIndex, args.CurrentPercent, args.Info); } - void InstallFinished(object sender, UpdateInstaller.FinishedEventArgs args) // "manuall" mode + void InstallFinished(object sender, UpdateInstaller.FinishedEventArgs args) // "manual" mode { if (args.Success) { @@ -1157,7 +1157,7 @@ public UpdateCallback(WuAgent agent) // Implementation of ISearchCompletedCallback interface... public void Invoke(ISearchJob searchJob, ISearchCompletedCallbackArgs e) { - // !!! warning this function is invoced from a different thread !!! + // !!! warning this function is invoked from a different thread !!! agent.mDispatcher.Invoke(new Action(() => { agent.OnUpdatesFound(searchJob); })); @@ -1166,7 +1166,7 @@ public void Invoke(ISearchJob searchJob, ISearchCompletedCallbackArgs e) // Implementation of IDownloadProgressChangedCallback interface... public void Invoke(IDownloadJob downloadJob, IDownloadProgressChangedCallbackArgs callbackArgs) { - // !!! warning this function is invoced from a different thread !!! + // !!! warning this function is invoked from a different thread !!! agent.mDispatcher.Invoke(new Action(() => { agent.OnProgress(downloadJob.Updates.Count, callbackArgs.Progress.PercentComplete, callbackArgs.Progress.CurrentUpdateIndex + 1, callbackArgs.Progress.CurrentUpdatePercentComplete, downloadJob.Updates[callbackArgs.Progress.CurrentUpdateIndex].Title); @@ -1176,7 +1176,7 @@ public void Invoke(IDownloadJob downloadJob, IDownloadProgressChangedCallbackArg // Implementation of IDownloadCompletedCallback interface... public void Invoke(IDownloadJob downloadJob, IDownloadCompletedCallbackArgs callbackArgs) { - // !!! warning this function is invoced from a different thread !!! + // !!! warning this function is invoked from a different thread !!! agent.mDispatcher.Invoke(new Action(() => { agent.OnUpdatesDownloaded(downloadJob, downloadJob.AsyncState); })); @@ -1185,7 +1185,7 @@ public void Invoke(IDownloadJob downloadJob, IDownloadCompletedCallbackArgs call // Implementation of IInstallationProgressChangedCallback interface... public void Invoke(IInstallationJob installationJob, IInstallationProgressChangedCallbackArgs callbackArgs) { - // !!! warning this function is invoced from a different thread !!! + // !!! warning this function is invoked from a different thread !!! agent.mDispatcher.Invoke(new Action(() => { agent.OnProgress(installationJob.Updates.Count, callbackArgs.Progress.PercentComplete, callbackArgs.Progress.CurrentUpdateIndex + 1, callbackArgs.Progress.CurrentUpdatePercentComplete, installationJob.Updates[callbackArgs.Progress.CurrentUpdateIndex].Title); @@ -1195,7 +1195,7 @@ public void Invoke(IInstallationJob installationJob, IInstallationProgressChange // Implementation of IInstallationCompletedCallback interface... public void Invoke(IInstallationJob installationJob, IInstallationCompletedCallbackArgs callbackArgs) { - // !!! warning this function is invoced from a different thread !!! + // !!! warning this function is invoked from a different thread !!! agent.mDispatcher.Invoke(new Action(() => { agent.OnInstalationCompleted(installationJob, installationJob.AsyncState); })); From 0ff49c8e674bc731f252407d9d04a2a9359c6cbb Mon Sep 17 00:00:00 2001 From: Mohamed Diaby Date: Sun, 27 Oct 2019 13:57:51 +0300 Subject: [PATCH 2/4] A typo fix fixed a typo in a comment. --- wumgr/UpdateInstaller.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wumgr/UpdateInstaller.cs b/wumgr/UpdateInstaller.cs index 1760fbb..9fe7561 100644 --- a/wumgr/UpdateInstaller.cs +++ b/wumgr/UpdateInstaller.cs @@ -71,7 +71,7 @@ private void NextUpdate() { if (!Canceled && mUpdates.Count > mCurrentTask) { - int Percent = 0; // Note: there does not seam to be an easy way to get this value + int Percent = 0; // Note: there does not seem to be an easy way to get this value Progress?.Invoke(this, new WuAgent.ProgressArgs(mUpdates.Count, mUpdates.Count == 0 ? 0 : (100 * mCurrentTask + Percent) / mUpdates.Count, mCurrentTask + 1, Percent, mUpdates[mCurrentTask].Title)); if (DoInstall) From 5e9a3d1c867972206509312d313c5b48adead650 Mon Sep 17 00:00:00 2001 From: Mohamed Diaby Date: Sun, 27 Oct 2019 14:00:08 +0300 Subject: [PATCH 3/4] Typo fix fixed a typo in a comment. --- wumgr/UpdateDownloader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wumgr/UpdateDownloader.cs b/wumgr/UpdateDownloader.cs index ef4dd3d..9a700f1 100644 --- a/wumgr/UpdateDownloader.cs +++ b/wumgr/UpdateDownloader.cs @@ -81,7 +81,7 @@ private void DownloadNextFile() mCurTask.Finished += OnFinished; if (mCurTask.Start()) return; - // Failedto start this task lets try an otehr one + // Failed to start this task lets try another one mCurrentTask++; } From e791d3566b9b0d1a3a5f8e1e6988beecd35269a8 Mon Sep 17 00:00:00 2001 From: Mohamed Diaby Date: Sun, 27 Oct 2019 14:09:41 +0300 Subject: [PATCH 4/4] Typo fix fixed a few spelling mistakes in a comment. --- wumgr/GPO.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wumgr/GPO.cs b/wumgr/GPO.cs index 5ec16ba..5d6a33e 100644 --- a/wumgr/GPO.cs +++ b/wumgr/GPO.cs @@ -304,7 +304,7 @@ static public void ConfigSvc(string name, ServiceStartMode mode) if (rule.IdentityReference.Value.Equals(FileOps.SID_System)) ac.RemoveAccessRule(rule); } - // Note: windows tryes to re enable this services so we need to remove system write access + // Note: windows trys to re-enable this service so we need to remove system write access if (mode == ServiceStartMode.Disabled) // add new rule ac.AddAccessRule(new RegistryAccessRule(new SecurityIdentifier(FileOps.SID_System), RegistryRights.FullControl, AccessControlType.Deny)); subKey.SetAccessControl(ac);