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)
{
case EVENT_COMMIT:
FileBrowser_Refresh (panelHandleFileBrowse, PANELFILE_FILEBROWSER, 0);
DisplayPanel (panelHandleFileBrowse);
//LaunchExecutable("C:\\Test\\HEX2BIN.EXE Project.hex proj.bin");
system("c:\\Test\\HEX2BIN.bat");
break;
}
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
pause
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?
Thanks
PS I have already asked at the LabWindows forum.