Add DWORD value


posted by Richard Giles
02-17-2009

Downloads: 333
File size: 1.1kB
Views: 1,888

Embed
Add DWORD value
  1. <?xml version="1.0"?> 
  2. <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"
  3.     <CodeSnippet Format="1.0.0"
  4.         <Header> 
  5.             <Title>Add DWORD value</Title> 
  6.             <Shortcut /
  7.             <Description>adds a DWORD value to a registry key</Description> 
  8.             <Author /
  9.             <SnippetTypes> 
  10.                 <SnippetType>Expansion</SnippetType> 
  11.             </SnippetTypes> 
  12.         </Header> 
  13.         <Snippet> 
  14.             <Declarations> 
  15.                 <Literal> 
  16.                     <ID>param1</ID> 
  17.                     <ToolTip>Parent Key</ToolTip> 
  18.                     <Default>HKCU:\Software\Testing\</Default> 
  19.                 </Literal> 
  20.                 <Literal> 
  21.                     <ID>param2</ID> 
  22.                     <ToolTip>Name of new value</ToolTip> 
  23.                     <Default>MyValue</Default> 
  24.                 </Literal> 
  25.                 <Literal> 
  26.                     <ID>param3</ID> 
  27.                     <ToolTip>the value to assign</ToolTip> 
  28.                     <Default>12</Default> 
  29.                 </Literal> 
  30.                 <Literal> 
  31.                     <ID>param4</ID> 
  32.                     <ToolTip>data type of value</ToolTip> 
  33.                     <Default>DWord</Default> 
  34.                 </Literal> 
  35.             </Declarations> 
  36.             <Code Language="PowerShell" Kind="-1"><![CDATA[New-ItemProperty "$param1$" -Name "$param2$" -Value $param3$ -PropertyType "$param4$"]]></Code> 
  37.         </Snippet> 
  38.     </CodeSnippet> 
  39. </CodeSnippets> 
Filed under: , ,

Adds a DWORD value to a registry key

Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.