Hi guys,

This might be a long shot but its worth a go....so im using LabWindows CVI, a ANSI C software development environment for "test and measurement, data acquisition, instrument control, and scientific analysis" application.

Now the problem I have is running a .exe application from a button click event:

int CVICALLBACK BrowseFileCallback (int panel, int control, int event,void *callbackData, int eventData1, int eventData2)
	char h2bPath[] = "C:\\Test\\HEX2BIN.EXE";
	switch (event)
				FileBrowser_Refresh (panelHandleFileBrowse, PANELFILE_FILEBROWSER, 0);
				DisplayPanel (panelHandleFileBrowse);
				//LaunchExecutable("C:\\Test\\HEX2BIN.EXE  Project.hex proj.bin");
	return 0;

I need to be able to run the HEX2BIN.exe application with the parameters "Project.hex" and "proj.bin", this firstly caused an error in the C code, so I went another way around this by putting the following into a .bat file

C:\\Test\\HEX2BIN.EXE Project.hex proj.bin


Now this batch file works fine when I run it physically (double clicking the icon)...however when I run it inside the program the cmd line window appears and a message "The system cannot execute the specified program".

Any ideas or suggestions?


PS I have already asked at the LabWindows forum.

Recommended Answers

You probably need to specify the full path of both input files, too.

Jump to Post

All 3 Replies

You probably need to specify the full path of both input files, too.

[...inside the batch file]

C:\Test\HEX2BIN.EXE c:\whatever\Project.hex c:\whatever\proj.bin

or if all of the files are in the same directory

HEX2BIN Project.hex proj.bin

Awesome thanks for the response.

I have sussed it, when running the .exe it needs the full location of both files (.hex and .bin), the hex2bin.exe needs to be in the root file of the application, and the file location needs to have NO spaces...so pretty much what you have provided their thines01!


Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.