Hi
I m in trouble with a white space included in the path of an .exe file.
Precisely located in Program Files/...
How to deal with the launching of a command that calls this .exe ?
CreateProcess(NULL, ligne_de_com, NULL, NULL, FALSE,
CREATE_DEFAULT_ERROR_MODE, NULL, NULL, &StartInfo, &Process)
According to the fact that the parser will stop after Program !
Any idea of the usual trick ?
For instance how Windows deals with the launching of the "execute" command
when it includes something in Program Files ?
Thanks for pieces of advice.
Regards
Xavier 6 1207
"se******@yahoo.fr" <se*************@discussions.microsoft.com> wrote in
message news:B8**********************************@microsof t.com... Hi I m in trouble with a white space included in the path of an .exe file. Precisely located in Program Files/... How to deal with the launching of a command that calls this .exe ?
CreateProcess(NULL, ligne_de_com, NULL, NULL, FALSE, CREATE_DEFAULT_ERROR_MODE, NULL, NULL, &StartInfo, &Process)
According to the fact that the parser will stop after Program ! Any idea of the usual trick ? For instance how Windows deals with the launching of the "execute" command when it includes something in Program Files ?
Thanks for pieces of advice.
Regards
Xavier
Have you tried to quote the path string just like: "c:\program files\...".
You have to put the quote signs the string!
Good Look! Sebastian Dau
thank you for answering but what you mean by "signs the quote" ?
since that you declare
CString ST="C:\Program Files\..."
or
char T[100];
strcpy(T,"C:\Program Files\...")
the result will still be that a white space WS will remain between Program
and Files, WS missunderstood by the command line parser unable to achieve the
task.
Xavier
"Sebastian Dau" wrote: "se******@yahoo.fr" <se*************@discussions.microsoft.com> wrote in message news:B8**********************************@microsof t.com... Hi I m in trouble with a white space included in the path of an .exe file. Precisely located in Program Files/... How to deal with the launching of a command that calls this .exe ?
CreateProcess(NULL, ligne_de_com, NULL, NULL, FALSE, CREATE_DEFAULT_ERROR_MODE, NULL, NULL, &StartInfo, &Process)
According to the fact that the parser will stop after Program ! Any idea of the usual trick ? For instance how Windows deals with the launching of the "execute" command when it includes something in Program Files ?
Thanks for pieces of advice.
Regards
Xavier
Have you tried to quote the path string just like: "c:\program files\...". You have to put the quote signs the string!
Good Look! Sebastian Dau se******@yahoo.fr wrote: CString ST="C:\Program Files\..."
"\"C:\\Program Files\\...\""
Tom
"Tamas Demjen" wrote: se******@yahoo.fr wrote: CString ST="C:\Program Files\..." "\"C:\\Program Files\\...\""
Thanks it seem to match but why ?
Every ones knows that one should "unspecialize" the \ doubling it, obviously
for not letting the compilator parser considere \Program like \P(followed by
rog..) but why could it fix the trouble induced by the presence of WhiteSpace
? I'd like to know.
X Tom
"se******@yahoo.fr" <se*************@discussions.microsoft.com> wrote in
message news:C3**********************************@microsof t.com... thank you for answering but what you mean by "signs the quote" ? since that you declare CString ST="C:\Program Files\..." or char T[100]; strcpy(T,"C:\Program Files\...") the result will still be that a white space WS will remain between Program and Files, WS missunderstood by the command line parser unable to achieve
the task. Xavier
"Sebastian Dau" wrote:
"se******@yahoo.fr" <se*************@discussions.microsoft.com> wrote in message news:B8**********************************@microsof t.com... Hi I m in trouble with a white space included in the path of an .exe
file. Precisely located in Program Files/... How to deal with the launching of a command that calls this .exe ?
CreateProcess(NULL, ligne_de_com, NULL, NULL, FALSE, CREATE_DEFAULT_ERROR_MODE, NULL, NULL, &StartInfo, &Process)
According to the fact that the parser will stop after Program ! Any idea of the usual trick ? For instance how Windows deals with the launching of the "execute"
command when it includes something in Program Files ?
Thanks for pieces of advice.
Regards
Xavier
Have you tried to quote the path string just like: "c:\program
files\...". You have to put the quote signs the string!
Good Look! Sebastian Dau
As Tamas wrotes...
"\"text\"" means putting quote signs into a string variable...
Sebastian Dau se******@yahoo.fr wrote: Thanks it seem to match but why ?
Because the operating system and the CreateProcess function treat
everything delimited by double quotes as a single path. This is one way
to get around the space in filename problem. The other one is using the
GetShortPathName API function, which converts long file names to short
ones (with no spaces).
Tom This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: qwweeeit |
last post by:
Hi all,
I need to limit as much as possible the lenght of a source line,
stripping white spaces (except indentation).
For example:
.. . max_move and AC_RowStack.acceptsCards ( self,...
|
by: \Dandy\ Randy |
last post by:
Hello everyone. I have been following misc posts, as well as reading several
FAQ's on this issue, unfortunatley I cannot locate a solution. I am hoping
that someone will be able to provide me with...
|
by: JA |
last post by:
Is there a way to remove all the white space in the fields?
I have been using Find-and-replace - looking for 2 or 3 or 4 or 10 spaces
and replacing them with none. I don't want to replace single...
|
by: snow |
last post by:
Hi All,
I noticed if file path has a white space, for example "C:\my document
\test.txt", the function File.Exists(filePath) always return false in
release mode. How could I make this function...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |