I can ALMOST do anything proper with Windows Registry but i can't do this and i can NOT move on until i do.I tried a lot of things and i see nothing wrong here but it got to be because it don't work. "PLEASE HELP" * if you can * ... Where am im going wrong.

This is what i use for IE 5.5 .. It may be difference for other versions. Value_Name = Do404Search

It's about enabling and disableing Java for IE... No big deal if mistake is made ... The original value is 01 00 00 00 just type it in. Or test it out with other safe BINARY keys such as desktop\WindowMetrics\MessageFont.

Two of my main goals "near ready" to run in my app :) sheeeeeeeee... But I can't wait another minute because i can't get past this on ;; my own and people got to many other things to do so forgive me for asking something that my be so simple to to fix but i don't have a clue where im going wrong. :(

NOT DWORD binary keys. There a BIG difference i finally notice. Maybe thats why most people including myself can't find much information about it. There are only two off topic post here for ASM.

Thanks in advance


.386
.model flat,stdcall
option casemap:none
WinMain proto :DWORD,:DWORD,:DWORD,:SWORD

include \MASM32\INCLUDE\windows.inc
include \MASM32\INCLUDE\user32.inc
include \MASM32\INCLUDE\kernel32.inc
include \masm32\include\advapi32.inc

includelib \MASM32\LIB\user32.lib
includelib \MASM32\LIB\kernel32.lib
includelib \masm32\lib\advapi32.lib

.const

KEY_QUERY_VALUE equ 01h
HKEY_CURRENT_USER equ 80000001h
ERROR_SUCCESS equ 0
NULL equ 0


REG_SZ equ 1
REG_BINARY equ 3
REG_DWORD equ 4
REG_DWORD_LITTLE_ENDIAN equ 4
REG_DWORD_BIG_ENDIAN equ 5


.data

SubKeyName BYTE "Software\Microsoft\Internet
Explorer\Main", 0

Value_Name BYTE "Do404Search",0
;;;;;;;;; Original value is 01 00 00 00

Value_Data BYTE "02 00 00 00",0 ;; Only for testing

.data?

rKey DWORD ?


.code
Main:

; I tried RegCreateKeyExA
; I tried RegCreateKeyExA
; I tried RegCreateKeyExA

;PUSH 0 ;;;;;;;;;;;;;;;;;;;;;;; lpdwDisposition
;PUSH offset rKey ;;;;;;;;;;; add of buf for opened handle
;PUSH 0 ;;;;;;;;;;;;;;;;;;;;;;; add of key security structure
;PUSH 0 KEY_SET_VALUE ;; desired security access
;PUSH 0 ;;;;;;;;;;;;;;;;;;;;;;; special options flag
;PUSH 0 ;;;;;;;;;;;;;;;;;;;;;;; address of class string
;PUSH 0 ;;;;;;;;;;;;;;;;;;;;;;; reserved
;PUSH offset SubKeyName ;address of subkey name
;PUSH HKEY_CURRENT_USER ; handle of an open key
;CALL RegCreateKeyExA



; ........................I tried RegOpenKeyExA
; ........................I tried RegOpenKeyExA
; ........................I tried RegOpenKeyExA

PUSH offset rKey
PUSH KEY_QUERY_VALUE
PUSH NULL
PUSH offset SubKeyName
PUSH HKEY_CURRENT_USER
CALL RegOpenKeyExA

PUSH eax ;;;;;;;;;;;;;;;;;;;; size of value data
PUSH offset Value_Data ;; address of value data
PUSH REG_BINARY ;;;;;;;;; flag for value type
PUSH 0 ;;;;;;;;;;;;;;;;;;;;;;; reserved
PUSH offset Value_Name ; address of value to set
PUSH offset rKey ;;;;;;;;;;; handle of key to set value for
CALL RegSetValueExA

PUSH rKey
CALL RegCloseKey

invoke MessageBoxA, 0, eax, 0, 0
invoke MessageBoxA, 0, offset Value_Name, 0, 0



end Main
Posted on 2003-06-27 20:05:15 by cmax
do

Value_Data BYTE 02,00,00,00

and

PUSH sizeof Value_Data ;;;;;;;;;;;;;;;;;;;;;;;;;; size of value data

should work
Posted on 2003-06-27 20:10:23 by x-dream
correction:

This is not the Java VM key it is only the IE Search key for MS.

I was looking for the safest way to post and all of them are safe as long as you replace the few numbers tamped with and even that DON'T hurt.

For a minute i thought i solved my own problem.

............................................................................

So RegOpenKeyExA is the starting point and not createkey and it don't need no double calling something or whatever.

I hope this dream come true. For real...

Going to try it now.

Thanks x-dream

Posted on 2003-06-27 20:47:01 by cmax
I tried with

.data
Value_Data BYTE 02,00,00,00

and

.const
Value_Data BYTE 02,00,00,00

also as Value_Data DWORD 02,00,00,00

and

With both create and open and it still did not work


PUSH sizeof value data
PUSH offset Value_Data
PUSH REG_BINARY
PUSH 0
PUSH offset Value_Name
PUSH offset rKey
CALL RegSetValueExA


This is really strange ...
Posted on 2003-06-27 22:20:11 by cmax
Hey Hey Hey :)

I must be nuts. I did it NEAR all a few years ago.

I founded that file but it was like (4) dup giving me 00 00 00 00 and that was it ....

So I left it along until now.

I did xdream thing to it and it WORKED

A dream come true after 3 YEARS

Thanks Guy

You can bet your life that there will never be no place on earth like this place.

Unbeliveable

PS: Posted on 2003-06-27 23:21:20 by cmax
Correction!!!

http://www.asmcommunity.net/board/showthread.php?threadid=14196&highlight=binary

Execute File in Memory (How To)

Now the seach END!!!
Posted on 2003-07-10 23:57:44 by cmax