Skip to main content

[archive] Help with DISPLAY_REG_QUERY_VALUE, please

  • October 26, 2007
  • 4 replies
  • 0 views

[Migrated content. Thread originally posted on 25 October 2007]

Below is code that we are trying to use to see the location of Internet Explorer on a PC. Can someone please help me in figuring out what is wrong with it? When it runs we get a WS-STATUS-CODE of "0", we get a WS-RETURN-SIZE of "57" but we get no value in the WS-RETURN-VALUE variable. One other change we have tried is removing the "DISPLAY" from the Call but that had no effect on the outcome.

MOVE SPACES TO WS-RETURN-VALUE.
MOVE ZEROS TO WS-STATUS-CODE
PTR.

CALL "DISPLAY_REG_QUERY_VALUE"
USING HKEY_CLASSES_ROOT,
WS-RETURN-VALUE,
WS-RETURN-SIZE,
"\\HTTP\\shell\\open\\command",
GIVING WS-STATUS-CODE.


Thanks for any help.

4 replies

[Migrated content. Thread originally posted on 25 October 2007]

Below is code that we are trying to use to see the location of Internet Explorer on a PC. Can someone please help me in figuring out what is wrong with it? When it runs we get a WS-STATUS-CODE of "0", we get a WS-RETURN-SIZE of "57" but we get no value in the WS-RETURN-VALUE variable. One other change we have tried is removing the "DISPLAY" from the Call but that had no effect on the outcome.

MOVE SPACES TO WS-RETURN-VALUE.
MOVE ZEROS TO WS-STATUS-CODE
PTR.

CALL "DISPLAY_REG_QUERY_VALUE"
USING HKEY_CLASSES_ROOT,
WS-RETURN-VALUE,
WS-RETURN-SIZE,
"\\HTTP\\shell\\open\\command",
GIVING WS-STATUS-CODE.


Thanks for any help.
Full program source is always welcome. Makes it much easier to help.

[Migrated content. Thread originally posted on 25 October 2007]

Below is code that we are trying to use to see the location of Internet Explorer on a PC. Can someone please help me in figuring out what is wrong with it? When it runs we get a WS-STATUS-CODE of "0", we get a WS-RETURN-SIZE of "57" but we get no value in the WS-RETURN-VALUE variable. One other change we have tried is removing the "DISPLAY" from the Call but that had no effect on the outcome.

MOVE SPACES TO WS-RETURN-VALUE.
MOVE ZEROS TO WS-STATUS-CODE
PTR.

CALL "DISPLAY_REG_QUERY_VALUE"
USING HKEY_CLASSES_ROOT,
WS-RETURN-VALUE,
WS-RETURN-SIZE,
"\\HTTP\\shell\\open\\command",
GIVING WS-STATUS-CODE.


Thanks for any help.
Full program source is always welcome. Makes it much easier to help.

[Migrated content. Thread originally posted on 25 October 2007]

Below is code that we are trying to use to see the location of Internet Explorer on a PC. Can someone please help me in figuring out what is wrong with it? When it runs we get a WS-STATUS-CODE of "0", we get a WS-RETURN-SIZE of "57" but we get no value in the WS-RETURN-VALUE variable. One other change we have tried is removing the "DISPLAY" from the Call but that had no effect on the outcome.

MOVE SPACES TO WS-RETURN-VALUE.
MOVE ZEROS TO WS-STATUS-CODE
PTR.

CALL "DISPLAY_REG_QUERY_VALUE"
USING HKEY_CLASSES_ROOT,
WS-RETURN-VALUE,
WS-RETURN-SIZE,
"\\HTTP\\shell\\open\\command",
GIVING WS-STATUS-CODE.


Thanks for any help.
You can try the "REG_QUERY_VALUE_EX".
Sample code:


CALL "REG_OPEN_KEY_EX" USING HKEY_CLASSES_ROOT,
"HTTP\\shell\\open\\command", KEY_QUERY_VALUE,
REG-SUBKEY-HANDLE GIVING REG-STATUS
IF REG-STATUS NOT = 0
EXIT PARAGRAPH
END-IF

CALL "REG_QUERY_VALUE_EX" USING REG-SUBKEY-HANDLE,
" ", REG_BINARY, KEY-VALUE, 128 GIVING REG-STATUS
IF REG-STATUS NOT = 0
DISPLAY MESSAGE BOX KEY-VALUE
END-IF

CALL "REG_CLOSE_KEY" USING REG-SUBKEY-HANDLE
GIVING REG-STATUS

[Migrated content. Thread originally posted on 25 October 2007]

Below is code that we are trying to use to see the location of Internet Explorer on a PC. Can someone please help me in figuring out what is wrong with it? When it runs we get a WS-STATUS-CODE of "0", we get a WS-RETURN-SIZE of "57" but we get no value in the WS-RETURN-VALUE variable. One other change we have tried is removing the "DISPLAY" from the Call but that had no effect on the outcome.

MOVE SPACES TO WS-RETURN-VALUE.
MOVE ZEROS TO WS-STATUS-CODE
PTR.

CALL "DISPLAY_REG_QUERY_VALUE"
USING HKEY_CLASSES_ROOT,
WS-RETURN-VALUE,
WS-RETURN-SIZE,
"\\HTTP\\shell\\open\\command",
GIVING WS-STATUS-CODE.


Thanks for any help.
You can try the "REG_QUERY_VALUE_EX".
Sample code:


CALL "REG_OPEN_KEY_EX" USING HKEY_CLASSES_ROOT,
"HTTP\\shell\\open\\command", KEY_QUERY_VALUE,
REG-SUBKEY-HANDLE GIVING REG-STATUS
IF REG-STATUS NOT = 0
EXIT PARAGRAPH
END-IF

CALL "REG_QUERY_VALUE_EX" USING REG-SUBKEY-HANDLE,
" ", REG_BINARY, KEY-VALUE, 128 GIVING REG-STATUS
IF REG-STATUS NOT = 0
DISPLAY MESSAGE BOX KEY-VALUE
END-IF

CALL "REG_CLOSE_KEY" USING REG-SUBKEY-HANDLE
GIVING REG-STATUS