Skip to content

Lin-Rexter/WindowsRegistry_Batch-Script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 

Repository files navigation

WindowsRegistry_Batch-Script

Introduction: Add, Delete, Rename, Modify to the windows registry keys or entries(values) using batch script.

介紹: 新增,刪除,重命名,修改機碼或登錄項目(值)


___________________________________________________________________________________________________________________________

Creating Keys:

New-Item -Path Registry::'Reg keys path'(If you want to overwrite a pre-existing use -Force)

Removing Keys:

1. Remove-Item -Path Registry::'Reg keys path'(Force delete use -Recurse)
2. Remove-Item -Path Registry::'Reg keys path\*'(Add"\*"delete all subkeys)

Rename Keys:

Rename-Item -Path Registry::"Reg keys path" -NewName 'New name' (Display the renamed value use -passthru)

Check the existence of the keys:

Get-item -Path Registry::'Reg keys path'(Get keys path)

Check the existence of the subkeys:

Get-ChildItem -Path Registry::'Reg keys path'(Show contained items use -Recurse)

Only display path:

Get-item -Path Registry::'Reg keys path' | Select-Object Name

Get-ChildItem -Path Registry::'Reg keys path' | Select-Object Name


___________________________________________________________________________________________________________________________

Creating New Entries:

New-ItemProperty -Path Registry::"Reg Entries Path" -Name 'Reg Entries Name' -PropertyType "Vulue Type" -Value 'Vulues'(If you want to overwrite a pre-existing use -Force)

Deleting Entries:

Remove-ItemProperty -Path Registry::"Reg Entries Path" -Name 'Reg Entries Name'

Renaming Entries:

Rename-ItemProperty -Path Registry::"Reg Entries Path" -Name 'Reg Entries Name' -NewName 'New name'(Display the renamed value use -passthru)

Setting Entries Values:

Set-ItemProperty -Path Registry::"Reg Entries Path" -Name 'Reg Entries Name' -Value 'New Values'(Display the renamed value use -passthru)

Check the existence of the entries:

Get-ItemProperty -Path Registry::'Reg Entries Path' -name 'Reg Entries Name'

Displays specifying item:

Get-ItemProperty -Path Registry::'Reg Entries Path' -name 'Reg Entries Name' | findstr 'Reg Entries Name'


___________________________________________________________________________________________________________________________

Translation quality is not the best, I apologize for the inconvenience cause and appreciate your understanding.

About

Add, Delete, Rename, Edit to the windows registry using batch script

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published