UtilDismCopyDriverPackageToDisk(DismDriverPackage, String, FuncDismDriverPackage, String, Boolean) Method
Copies the files of the source driver package to the specified directory path.
Namespace: DevCase.ThirdParty.DismAssembly: DevCase.net48.ThirdParty.Dism (in DevCase.net48.ThirdParty.Dism.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static void CopyDriverPackageToDisk(
DismDriverPackage driverPackage,
string destinationDirPath,
Func<DismDriverPackage, string> subDirectoryName,
bool overwrite
)
Public Shared Sub CopyDriverPackageToDisk (
driverPackage As DismDriverPackage,
destinationDirPath As String,
subDirectoryName As Func(Of DismDriverPackage, String),
overwrite As Boolean
)
Dim driverPackage As DismDriverPackage
Dim destinationDirPath As String
Dim subDirectoryName As Func(Of DismDriverPackage, String)
Dim overwrite As Boolean
UtilDism.CopyDriverPackageToDisk(driverPackage,
destinationDirPath, subDirectoryName,
overwrite)
public:
static void CopyDriverPackageToDisk(
DismDriverPackage^ driverPackage,
String^ destinationDirPath,
Func<DismDriverPackage^, String^>^ subDirectoryName,
bool overwrite
)
static member CopyDriverPackageToDisk :
driverPackage : DismDriverPackage *
destinationDirPath : string *
subDirectoryName : Func<DismDriverPackage, string> *
overwrite : bool -> unit
No code example is currently available or this language may not be supported.
Parameters
- driverPackage DismDriverPackage
-
A DismDriverPackage object that represents the driver files to copy.
- destinationDirPath String
-
The destination directory path where to copy the driver files.
- subDirectoryName FuncDismDriverPackage, String
-
Creates a custom subdirectory in the destination directory
with the specified folder name based on the DismDriverPackage object properties.
This value can be , in which case
the directory name of OriginalFileName property is used as the name for the subdirectory.
(E.g: "{DESTINATION_DIRECTORY}\ipsfullhd.inf_amd64_ce187df9e604b5d6\" )
- overwrite Boolean
-
A value indicating whether to overwrite any existing files in the destination directory.
Note: Some functionalities of this assembly may require to install one or all of the listed NuGet packages:
Microsoft.Dism by jeffkl
This is a code example.
No code example is currently available or this language may not be supported.
Dim destinationDirPath As String = "C:\Drivers_Test"
Dim subdirectoryName As Func(Of DismDriverPackage, String) =
Function(x) ($"[{x.ClassName}] {x.ProviderName} ({DismDriverPackageExtensions.GetPackageDirectoryInfName(x)} v{x.Version})\{DismDriverPackageExtensions.GetPackageDirectory(x).Name}")
' Eg.: C:\Drivers_Test\[Display] NVIDIA (nv_dispig v30.0.15.1179)\nv_dispig.inf_amd64_3b12ac0f95b18b9d
' Get the third-party drivers.
Dim thirdPartyDrivers As ReadOnlyCollection(Of DismDriverPackage) = DismUtil.GetDriverPackages(GetDriverPackagesFlags.NotInbox)
' Iterate through the third-party drivers.
For Each driverPackage As DismDriverPackage In thirdPartyDrivers
' Copy the driver files.
DismUtil.CopyDriverPackageToDisk(driverPackage, destinationDirPath, subdirectoryName, overwrite:=True)
Next
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.