Sign in to follow this  
Followers 0

[Solved]regread() for reg_qword(11) type unable to read value from regedit.

2 posts in this topic

#1 ·  Posted (edited)

Hallo Dear AutoIT Community.

I'm trying automate GPO task for prevent execute of some applicaiton on machine(Based on MD5 SUM for file).(OS=WIN XP2)

( Belongs to )

Theris no problem trace registry chacnges also write to regedit .

But now i have problem.

Problem in that regread() is unable to read REG_QWORD(11) types values from regedit.

Posted Image

In fact using regwrite() with REG_QWORD() successfull for me.

Like this:

$main="HKEY_USERS\S-1-5-21-436374069-299502267-839522115-1007\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects\{212C5223-8731-4415-AD99-4BA2393901A4}Machine\Software\Policies\Microsoft\Windows\Safer\CodeIdentifiers\0\Hashes\{9d36208f-c301-44cf-b785-fd60a6e94d52}"


But it's unable to read ItemSize value because it is 64 bit number.If i understand correctly Autoit has limitation and this issuse associated with it.

Am i right?Or misunderstand?

Valid export for regedit gives me reg.reg file which contains(see below)


"FriendlyName"=" ("

Can you see

<== how to read it using Autoit regread() funcsion?

I have all read/write permissions to regedit.But regread() for ItemSize gives me nothing which means error :graduated:( Also for LastModified)

Autoit version:v3.3.6.0

OS = Win Xp SP2 (32bit)


Is here another alternative way for solve this?

Any hints, helps please?

Thanks so much GREAT COMMUNITY;).

Edited by Fire

[size="5"] [/size]

Share this post

Link to post
Share on other sites


Solution (Thanks very much wraithdu for this great UDF!)

#Include <String.au3>
#include <udf.au3>
$str= _RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Safer\CodeIdentifiers\0\Hashes\{ca394125-3470-4a71-b977-846792228ea1}", "ItemSize")
$str=$str / 1000000

$out=StringMid($str,StringInStr($str,".",0,1) - 1,StringInStr($str,".",0,1) +1)

MsgBox(64,"","Filesize = " &  $out& " MB")


Thx to all

[size="5"] [/size]

Share this post

Link to post
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
Sign in to follow this  
Followers 0