flat assembler
Message board for the users of flat assembler.

Index > Windows > SHCopyKey

Author
Thread Post new topic Reply to topic
semiono



Joined: 31 Aug 2007
Posts: 176
Location: section '.code' executable
semiono
Code:
include '%fasm%/win64ax.inc'
section '.code' executable
start:
        sub rsp,8

        invoke SHCopyKey,HKEY_LOCAL_MACHINE,'Software\$$',HKEY_CURRENT_USER,NULL
exit:
        invoke ExitProcess,NULL

section '.idata' import readable

        library kernel32,'KERNEL32.DLL',shlwapi,'SHLWAPI.DLL'
        include '%fasm%/api/kernel32.inc'
        import shlwapi,SHCopyKey,'SHCopyKeyA'    


Only work as
HKEY_LOCAL_MACHINE\Software\$$\Software\test >> HKEY_CURRENT_USER\Software\test
with x64 OS.
Confused ?

_________________
Memory=8388608
Post 28 Feb 2013, 18:22
View user's profile Send private message ICQ Number Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
What is your question? And indeed, fasm is not masm32.
Post 01 Mar 2013, 07:47
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
semiono



Joined: 31 Aug 2007
Posts: 176
Location: section '.code' executable
semiono
How to copy key under x64 system? SHCopyKey not work properly
Post 01 Mar 2013, 11:12
View user's profile Send private message ICQ Number Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
Try opening the key yourself and specify KEY_WOW64_64KEY. Use the handle with SHCopyKey (instead of HKEY_LOCAL_MACHINE).
Post 01 Mar 2013, 12:29
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.