November 10, 200520 yr I'm developing an application that will run BGLCOMP using the ShellExecuteEx() function.I can do this but it appears not to find the files if the paths to BGLCOMP and/or the .xml files have a space in them EG if the paths include "Program Files". Could this be a DOS hangover?Is anyone else aware of this or am I doing something wrong? Gerry Howard
November 10, 200520 yr All you need to do is place quotes around the path. ie:bglcomp "E:Top DirectoryXMLFilename.xml"Also, ensure that bglcomp.exe and bglcomp.xsd are in the application directory.George
November 11, 200520 yr Author Thanks, but your suggestion doesn't seem to work programatically. It may work in the Command Line.I am creating my path as a string and assigning the string to the lpFile member of the SHELLEXECUTEINFO structure. I get the same error message with and without additional quotes as follows:Windows cannot find '"C:T estbglcomp.exe"'Windows cannot find 'C:T estbglcomp.exe' It works perfectly with the space removed from Test.My workround is to use the current directory by omitting the path and not setting the lpDirectory member of SHELLEXECUTEINFO. This requires the .xml and .bgl files to be in the same directory as my application which is a minor, but annoying, limitation. Gerry Howard
November 11, 200520 yr Can you read and store the string value in a variable and then use the variable in your script / statement?
November 11, 200520 yr This works fine for me: CString Command = "BGLCOMP.EXE "" + m_Filename + "" >> t.txt"; system(Command);George
November 11, 200520 yr Author Thanks. I hadn't thought of using system :(I'll try it tomorrow - it's also simpler than the ways I've been trying. Gerry Howard
Create an account or sign in to comment