dde

perform DDE client operations 

Command


SYNOPSIS

dde -r item -s server -t topic [-T timeout] [-x]

dde -c request -s server -t topic [-T timeout]


DESCRIPTION

The dde command allows you to communicate with DDE servers. Several parameters are always required to perform a DDE operation. The name of the server is always required. For example, PROGMAN is the DDE server name of the Program Manager. A topic is also required. Some servers may ignore the topic, others may require it in the same way as the server name; however, normally there is a set of valid topics. dde can perform two types of operations: request the value of a data item or execute a command string.

Options

-c request 

specifies a command string to be executed.

-r item 

specifies the name or value of an item being requested.

-s server 

specifies the name of the DDE server.

-t topic 

specifies the topic.

-T timeout 

specifies, in milli-seconds, the timeout during which the DDE server must respond. Default is 5000 milli-seconds, that is 5 seconds.

-x 

displays, for data requests only, the returned values in hexadecimal. Each byte is displayed as two hex digits, separated by a space. Normal return from the -r is to display the data returned as a string.


EXAMPLE

The following brings up the startup program group. Note that the Explorer and the old Program Manager both have the same DDE server name, PROGMAN.

dde -s PROGMAN -t PROGMAN -c '[ShowGroup("Startup", 1)]'

Look up in the Windows Registry Database the name of the browser installed on the current machine, as well as the name of the Topic which causes it to open a given URL. Normally the browser is either Netscape, or IExplore, and normally the topic is WWW_OpenURL. This command takes a URL as the item requested. It returns a 4 byte binary number being the browser window ID which was opened for that topic.

s=$(registry -r -p -k 'HKEY_CLASSES_ROOT\http\shell\open\ddeexec\Application')
t=$(registry -r -p -k 'HKEY_CLASSES_ROOT\http\shell\open\ddeexec\Topic')
dde -x -s $s -t $t -r http://www.mks.com/

DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

>0 

An error occurred.


PORTABILITY

Windows 7. Windows Server 2008 R2. Windows 8. Windows Server 2012. Windows 10. Windows Server 2016.


AVAILABILITY

PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


PTC MKS Toolkit 10.1 Documentation Build 15.