Jump to content

RegWrite hex(0)?


Recommended Posts

Friends want to add the same.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\DownloadManager]
"LocalPathW"=hex(0):44,00,3a,00,5c,00,44,00,6f,00,77,00,6e,00,6c,00,6f,00,61,\
 00,64,00,00,00


I tried every way, do you have any idea?

I've tried all the codes

http://prntscr.com/oo39pa

#RequireAdmin
#include <String.au3>

;~ $sString1 = 'C:\Users\USER\Desktop'
$sString = 'D:\Download'

;RegWrite('HKCU\Software\DownloadManager', 'LocalPathW', 'REG_BINARY', StringToBinary('D:\Download'))
;~ RegWrite('HKCU\Software\DownloadManager', 'LocalPathW', 'REG_BINARY', Binary('0x' & $sString))

;or
;~ RegWrite('HKCU\Software\DownloadManager', 'LocalPathW', 'REG_BINARY', $sString)

;or
$StConvertHex = _StringToHex("D:\Download")
;~ RegWrite("HKCU\Software\DownloadManager", "LocalPathW", "REG_BINARY", $StConvertHex)
;~ RegWrite("HKCU\Software\DownloadManager", "LocalPathW", "REG_BINARY", "0x" & $StConvertHex)
;or
;~ RegWrite("HKCU\Software\DownloadManager", "LocalPathW", "REG_MULTI_SZ", "0x" & $StConvertHex)
RegWrite('HKCU\Software\DownloadManager', 'LocalPathW', 'REG_BINARY', Binary('0x' & $StConvertHex))

 

Edited by youtuber
Link to comment
Share on other sites

Here how to convert string to fit registry binary write :

#RequireAdmin
#include <Constants.au3>
#include <String.au3>

Local $sHex = _StringToHex("D:\Download")
Local $sFinal = "0x"
For $i = 1 to StringLen ($sHex)/2
  $sFinal &= StringMid ($sHex,$i*2-1,2) & "00"
Next
MsgBox ($MB_SYSTEMMODAL,"",$sFinal)
Regwrite ('HKCU\Software\DownloadManager', 'LocalPathW', 'REG_BINARY', $sFinal)

 

Edited by Nine
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...