NsisDDE plug-in

From NSIS Wiki

Author: Wizou (talk, contrib)


Links

nsisDDE Plugin Homepage

Description

Small NSIS plugin to sends DDE client requests written by Olivier Marcoux

The following is taken from the readme file in the downloadable zip file:

nsisDDE sends DDE client requests to currently running applications with DDE
server matching the "server application name / topic name" pair you provide

You can typically use it to:
- close running instances of an application (eg: to prevent EXE and DLL to be in use)
- bring a running application to the foreground
- have an application open a document

Usage
-----
nsisDDE::Execute [<options>] "<appname>" "<commands>"

<appname> is the name the application uses for its DDE requests
	(this is not case sensitive and not necessarily the name of the program executable)
	ex: Excel, IExplore, ...

<commands> can be any valid DDE request, specific to the application
	(this is usually one or more opcode strings enclosed in single brackets [...])
	ex: [open("%1")][print()], [SetForeground], [Quit]...

<options> are:
			if many running applications respond to the appname/topic pair,
	/ALL	send the request to all of them (default)
	/FIRST	send the request only to the first of them that responded
	/LAST	send the request only to the last of them that responded
		note: this is not necessarily the instance runned first or last

	/TOPIC=<topicname>
			indicates the DDE topic name (default is "System")
			(this is not case sensitive)
			
	/TIMEOUT=<seconds>
			if some applications are hung or takes too much time to reply,
			or on the contrary, you want to give them more time to reply,
			the timeout defines the maximum time nsisDDE will wait (default is 2)

Return Value
------------

nsisDDE returns an integer status on the top of the stack
Possible status are:
	0:  No matching DDE server was detected or they refused the request
	>0: number of DDE servers that were detected and accepted the request
			(if /FIRST or /LAST was used, it cannot obviously be more than 1)
	-1: Invalid option parameter
	-2: Not enough parameters
	-3: Could not create DDE client window
Personal tools
donate
ads