UtilRegistryScriptCodeConverterConvertRegToBat(FileInfo, Boolean, Boolean, Boolean, CmdCommandRedirection) Method
Converts a Registry Script to a Batch Script.
Namespace: DevCase.Core.Diagnostics.CodeConversionAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static string ConvertRegToBat(
FileInfo registryFile,
bool abbreviateRootKeys = true,
bool ignoreStartingKeys = true,
bool forceRegistryOverwritting = true,
CmdCommandRedirection commandRedirection = CmdCommandRedirection.None
)
Public Shared Function ConvertRegToBat (
registryFile As FileInfo,
Optional abbreviateRootKeys As Boolean = true,
Optional ignoreStartingKeys As Boolean = true,
Optional forceRegistryOverwritting As Boolean = true,
Optional commandRedirection As CmdCommandRedirection = CmdCommandRedirection.None
) As String
Dim registryFile As FileInfo
Dim abbreviateRootKeys As Boolean
Dim ignoreStartingKeys As Boolean
Dim forceRegistryOverwritting As Boolean
Dim commandRedirection As CmdCommandRedirection
Dim returnValue As String
returnValue = UtilRegistryScriptCodeConverter.ConvertRegToBat(registryFile,
abbreviateRootKeys, ignoreStartingKeys,
forceRegistryOverwritting, commandRedirection)
public:
static String^ ConvertRegToBat(
FileInfo^ registryFile,
bool abbreviateRootKeys = true,
bool ignoreStartingKeys = true,
bool forceRegistryOverwritting = true,
CmdCommandRedirection commandRedirection = CmdCommandRedirection::None
)
static member ConvertRegToBat :
registryFile : FileInfo *
?abbreviateRootKeys : bool *
?ignoreStartingKeys : bool *
?forceRegistryOverwritting : bool *
?commandRedirection : CmdCommandRedirection
(* Defaults:
let _abbreviateRootKeys = defaultArg abbreviateRootKeys true
let _ignoreStartingKeys = defaultArg ignoreStartingKeys true
let _forceRegistryOverwritting = defaultArg forceRegistryOverwritting true
let _commandRedirection = defaultArg commandRedirection CmdCommandRedirection.None
*)
-> string
No code example is currently available or this language may not be supported.
- registryFile FileInfo
-
The registry file to convert.
- abbreviateRootKeys Boolean (Optional)
-
If set to , the root keys will be abbreviated.
Example: HKEY_CLASSES_ROOT -> HKCR
- ignoreStartingKeys Boolean (Optional)
-
If set to , starting keys to add into the registry will not be converted.
Example: [HKEY_CLASSES_ROOT\.ext] -> REG ADD "HKEY_CLASSES_ROOT\.ext"
- forceRegistryOverwritting Boolean (Optional)
-
If set to , REG commands are forced to overwrite the registry.
- commandRedirection CmdCommandRedirection (Optional)
-
Indicates whether the standard/error output of the converted Batch REG commands should be redirected to in CMD.
This value can be a combination of one or more Flags.
String
The resulting Batch-Script content.
This is a code example.
No code example is currently available or this language may not be supported.
Dim batchScript As String = ConvertRegToBat(New FileInfo("C:\RegistryFile.reg"))
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.