mysql命令行导入导出_如何在Windows中通过命令行添加,删除,删除,导入,导出,管理注册表项?...

mysql命令行导入导出

mysql命令行导入导出

Registry is a database used by Windows operating systems to store information about applications, users, operating system, network etc. Registry is a single file located at C:\Windows\System32\Config . There are following files those holds registry values

注册表是Windows操作系统用于存储有关应用程序,用户,操作系统,网络等信息的数据库。注册表是位于C:\Windows\System32\Config的单个文件。 以下文件包含注册表值

  • HKEY_LOCAL_MACHINE is hold in SYSTEM

    HKEY_LOCAL_MACHINE保留在SYSTEM中
  • HKEY_LOCAL_MACHINE is hold in SAM

    HKEY_LOCAL_MACHINE在SAM中保留
  • HKEY_LOCAL_MACHINE is hold in SECURITY

    HKEY_LOCAL_MACHINE处于SECURITY状态
  • HKEY_LOCAL_MACHINE is hold in SOFTWARE

    HKEY_LOCAL_MACHINE在软件中保留
  • HKEY_USERS is hold in \winnt\profiles\username

    HKEY_USERS保留在\ winnt \ profiles \ username中
  • HKEY_USERS.DEFAULT is hold in \system32\config\default

    HKEY_USERS.DEFAULT保留在\ system32 \ config \ default中

帮帮我(Help)

Help information about reg command can be printed like below. We will use /? option.

可以如下所示打印有关reg命令的帮助信息。 我们将使用/ ? 选项。

$ reg /?
Help
Help
帮帮我

注册表项和值(Registry Keys and Values)

Registry values are hold in hierarchical manner like a tree. Registry keys hold the name and value hold real value. For example following path specifies  current users Explorer version.

注册表值像树一样以分层方式保存。 注册表项保留名称,值保留实际值。 例如,以下路径指定当前用户的资源管理器版本。

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer

As we can see the path starts with HKEY_CURRENT and resume according to hierarchy.

如我们所见,路径以HKEY_CURRENT开头,并根据层次结构恢复。

子键 (Sub Keys)

Subkeys a registery keys too which used to inform that a keys child key is subkey and this sub key can hold subkeys in recursive manner too.

子键也是一个注册键,用于通知某个键的子键是子键,并且该子键也可以递归方式保存子键。

在注册表中查询值 (Query Value In The Registry)

Registry values can be queried to get their values and sub keys.  We will use query sub-command to query registry key named Explorer.

可以查询注册表值以获取其值和子项。 我们将使用query子命令来查询名为Explorer的注册表项。

reg query HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer
Query Value In The Registry
Query Value In The Registry
在注册表中查询值

In this example there is one key and value pairs those listen in the first lines of the output. Below lines shows subkeys of queried registry key.

在此示例中,有一个键和值对,它们在输出的第一行中侦听。 下面几行显示了查询的注册表项的子项。

将密钥添加到注册表 (Add Key To Registry)

We can add news keys to the registry. We will use /ADD option with related new key path and name in a single path. In this example we will add new key named Test to the given path. In order to modify registry we need Administrator privileges.

我们可以将新闻密钥添加到注册表中。 我们将在单个路径中使用/ADD选项以及相关的新密钥路径和名称。 在此示例中,我们将添加名为Test新键到给定路径。 为了修改注册表,我们需要管理员权限。

reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Test
Add Key To Registry
Add Key To Registry
将密钥添加到注册表

将键值添加到注册表(Add Key Value To Registry)

Another example to add key to registry is providing values too. Registry values generally have 4 different types like below;

向注册表添加密钥的另一个示例也提供了值。 注册表值通常具有4种不同的类型,如下所示;

  • REG_BINARY used to hold binary values

    REG_BINARY用于保存二进制值

  • REG_SZ used to hold string and character values

    REG_SZ用于保存字符串和字符值

  • REG_DWORD used to hold 32 bit numbers

    REG_DWORD用于保存32位数字

  • REG_MULTI_SZ used to hold multi line string

    REG_MULTI_SZ用于保存多行字符串

LEARN MORE  How Create and Use Dictionary In JavaScript Tutorial with Examples?
了解更多信息如何在JavaScript教程中使用示例创建和使用字典?

We will add string type value into key named MyName with data ismail .

我们将使用数据ismail将字符串类型值添加到名为MyName键中。

$ reg add  HKEY_CURRENT_USER\Software\Microsoft\MyName /v Data /t REG_SZ /d ismail
Add Key Value To Registry
Add Key Value To Registry
将键值添加到注册表

删除注册表中的值(Delete Value In The Registry)

Deleting key and values from registry easir than adding them. In order to delete a key and its data if data exist can be done /DELETE subcommand.

从注册表easir删除键和值,而不是添加它们。 为了删除键及其数据(如果存在数据),可以执行/DELETE子命令。

$ reg delete  HKEY_CURRENT_USER\Software\Microsoft\MyName
Delete Value In The Registry
Delete Value In The Registry
删除注册表中的值

Deleting key from registry is a critical operation. So we should be careful while dealing registry key. During the deletion operation a confirmation required to answered yes.

从注册表中删除密钥是一项关键操作。 因此,在处理注册表项时我们应该小心。 在删除操作期间,需要确认以回答“是”。

从注册表导出 (Export From Registry)

Registry keys can be exported with their values and subkeys. We will use EXPORT command for  this operation. We need to specify the key tree to export and the file where the export output will be saved.

可以将注册表项及其值和子项导出。 我们将使用EXPORT命令进行此操作。 我们需要指定要导出的密钥树以及将保存导出输出的文件。

In this example we will export HKEY_CURRENT_USER\Software\Microsoft into file named Microsoft.reg

在此示例中,我们将HKEY_CURRENT_USER\Software\Microsoft导出到名为Microsoft.reg文件中

$ reg export  HKEY_CURRENT_USER\Software\Microsoft Microsoft.reg

导入注册表 (Import Into Registry)

Saved registry keys and values can be imported similar to export operation. We will just provide the saved registry. This will automatically imported to the relevant tree hierarchy.

可以导入保存的注册表项和值,类似于导出操作。 我们将只提供保存的注册表。 这将自动导入到相关的树层次结构中。

$ reg import Microsoft.reg

翻译自: https://www.poftut.com/how-to-add-remove-delete-import-export-manage-registry-keys-from-command-line-in-windows/

mysql命令行导入导出

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值