Sign in
|
Join PowerShell.com!
|
Help
Home
PowerTips
Ask the Experts
Forums
Webcasts
Blogs
eBookV2
Script Library
Twitter Grid
Modules
QuickClick
Scripts
Snippets
Videos
Library
»
Snippet Library
»
Registry
»
Add DWORD value
Add DWORD value
Share
|
Browse Library
Module Library
QuickClick Library
Script Library
Snippet Library
ADSI
Comparison
Conditions and Loops
.Net
Exception Handlers
Files and Folders
Functions
Headers
Includes
Network
Pipeline
PowerShell Internals
Registry
Samples
Script Functions Templates
Security
SQL Server
Templates
User Management
WMI
Video Library
Members Only
Tags
Add Value
DWORD
Registry
Snippet
View more
Previous
|
Next
|
View all files
|
View Slideshow
Download
posted by
Richard Giles
02-17-2009
Downloads: 333
File size: 1.1kB
Views: 1,888
Embed
Add DWORD value
<?
xml
version
=
"1.0"
?>
<CodeSnippets xmlns
=
"http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"
>
<CodeSnippet Format
=
"1.0.0"
>
<Header>
<Title>Add DWORD value<
/
Title>
<Shortcut
/
>
<Description>adds a DWORD value to a registry key<
/
Description>
<Author
/
>
<SnippetTypes>
<SnippetType>Expansion<
/
SnippetType>
<
/
SnippetTypes>
<
/
Header>
<Snippet>
<Declarations>
<Literal>
<ID>param1<
/
ID>
<ToolTip>Parent Key<
/
ToolTip>
<Default>HKCU:\Software\Testing\<
/
Default>
<
/
Literal>
<Literal>
<ID>param2<
/
ID>
<ToolTip>Name of new value<
/
ToolTip>
<Default>MyValue<
/
Default>
<
/
Literal>
<Literal>
<ID>param3<
/
ID>
<ToolTip>the value to assign<
/
ToolTip>
<Default>12<
/
Default>
<
/
Literal>
<Literal>
<ID>param4<
/
ID>
<ToolTip>data type of value<
/
ToolTip>
<Default>DWord<
/
Default>
<
/
Literal>
<
/
Declarations>
<Code Language
=
"PowerShell"
Kind
=
"-1"
><
!
[CDATA[
New-ItemProperty
"$param1$"
-Name
"$param2$"
-Value
$param3
$
-PropertyType
"$param4$"
]]><
/
Code>
<
/
Snippet>
<
/
CodeSnippet>
<
/
CodeSnippets>
Filed under:
Registry
,
Snippet
,
DWORD
Adds a DWORD value to a registry key
Copyright 2011 PowerShell.com. All rights reserved.