title: How to run the .reg file using PowerShell?
body: <p>I want to run the .reg file (registry file) using PowerShell Script but I am not able to run it. When i run it manually it creates the respective nodes in registry but i want it execute using powershell script.
  Below is the code which i tried using but got no results -</p>
  
  <pre><code>$PathofRegFile="c:\file.reg"
  regedit /s $PathofRegFile
  </code></pre>
  
  <p>Another code which i tried was this -</p>
  
  <pre><code>Start-Process -filepath "C:\windows\regedit.exe" -argumentlist "/s c:\file.reg"
  </code></pre>
  
  <p>Please Help..!</p>
  
  <p>Below is the Content of my .reg file </p>
  
  <pre><code>Windows Registry Editor Version 5.00
  
  [HKEY_LOCAL_MACHINE\SOFTWARE\SePI]
  
  [HKEY_LOCAL_MACHINE\SOFTWARE\SePI\STEP]
  @=""
  
  [HKEY_LOCAL_MACHINE\SOFTWARE\SePI\STEP\Platform]
  "VERSION"="8.2.6.0"
  
  [HKEY_LOCAL_MACHINE\SOFTWARE\SePI\STEP\Platform\AppService]
  "MONITORINTERVAL"=dword:00000005
  "MONITORAPPS"="STEP Audit"
  
  [HKEY_LOCAL_MACHINE\SOFTWARE\SePI\STEP\Platform\Audit]
  "TRACEON"=dword:00000000
  "TRACEDIR"="Specifies the directory to dump trace files if TRACEON is set to 1"
  
  [HKEY_LOCAL_MACHINE\SOFTWARE\SePI\STEP\Platform\Common]
  "SSMITRACEFILEX"="C:\\Program Files\\SePI\\STEP\\LogFiles\\SSMITraceFile.txt"
  "SSMILOGERRORSLOCALLY"="Yes"
  "SSMIDoNotSendToAudit"="FALSE"
  "ResourceFile"="C:\\Program Files\\SePI\\STEP\\Programs\\"
  "REPORTALLEXCEPTIONS"="Yes"
  "KSPath"="C:\\Program Files\\SePI\\STEP\\KeyStore\\"
  "KEY"="10069356713705F858B56A9E850DD8CB7D"
  "intelliSUITEnode"="WebApp"
  "InstallationDir"="C:\\Program Files\\SePI\\STEP\\"
  "IMSFirstRun"=dword:00000001
  "CONFIGPATH"="C:\\Program Files\\SePI\\STEP\\Configuration Files\\"
  "COM_VERBOSEGLOBALCACHE"="False"
  "COM_UserProfileCacheExpirationInSecs"="30"
  "COM_SSMISenderUtilCacheExpirationInSecs"="120"
  "COM_REPORTIGNOREDEXCEPTIONSASWARNINGS"="True"
  "COM_LOCALUTILSCACHEEXPIRATIONINSECS"="600"
  "COM_DEFAULTPROPERTYCACHEEXPIRATIONINSECS"="600"
  "ProductName"="Ron"
  
  [HKEY_LOCAL_MACHINE\SOFTWARE\SePI\STEP\Platform\ESI]
  
  [HKEY_LOCAL_MACHINE\SOFTWARE\SePI\STEP\Platform\ESI\ITranQueryPrep]
  "PATH"="C:\\Program Files\\SePI\\STEP\\QueryTemplates"
  
  [HKEY_LOCAL_MACHINE\SOFTWARE\SePI\STEP\Platform\ITran]
  "MAXROWSTORETURN"=dword:000003e8
  "WRITERPSWD"="PASSWORD"
  "WRITER"="ITRAN_WRITER"
  "SERVER"="SQL SERVER"
  "READERPSWD"="PASSWORD"
  "READER"="ITRAN_READER"
  "DBNAME"="DATABASENAME"
  
  [HKEY_LOCAL_MACHINE\SOFTWARE\SePI\STEP\Platform\ReportingSvc]
  "STATUSINTERVAL"="5"
  "POLLINTERVAL"="2"
  "MONITORINTERVAL"="5"
  "MAXWORKERTHREADS"="5"
  "CONFIGFILE"="C:\\Program Files\\SePI\\STEP\\Configuration Files\\"
  </code></pre>