Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/c#/GeneralUpdate.Core/Driver/BackupDriverCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public BackupDriverCommand(DriverInformation information)

public void Execute()
{
/*
* Back up the specified list of drives.
*/
foreach (var driverName in _information.DriverNames)
{
var command = new StringBuilder("/c dism /online /export-driver /destination:\"")
Expand Down
6 changes: 6 additions & 0 deletions src/c#/GeneralUpdate.Core/Driver/DriverProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace GeneralUpdate.Core.Driver
{
/// <summary>
/// Handle all drive-related.
/// </summary>
public class DriverProcessor
{
private List<IDriverCommand> _commands = new List<IDriverCommand>();
Expand All @@ -11,6 +14,9 @@ public void AddCommand(IDriverCommand command)
_commands.Add(command);
}

/// <summary>
/// Execute all driver-related commands.
/// </summary>
public void ProcessCommands()
{
foreach (var command in _commands)
Expand Down
1 change: 1 addition & 0 deletions src/c#/GeneralUpdate.Core/Driver/InstallDriverCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public void Execute()
{
try
{
//Install all drivers in the specified directory, and if the installation fails, restore all the drivers in the backup directory.
var command = new StringBuilder("/c pnputil /add-driver \"")
.Append(_information.InstallDirectory)
.Append("\"")
Expand Down
1 change: 1 addition & 0 deletions src/c#/GeneralUpdate.Core/Driver/RestoreDriverCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public RestoreDriverCommand(DriverInformation information)

public void Execute()
{
//Restore all drives in the backup directory.
var command = new StringBuilder("/c pnputil /add-driver \"")
.Append(_information.OutPutDirectory)
.Append("\"")
Expand Down