Discussion:
Invoking blat from a C++ application
(too old to reply)
annfitchard
2008-04-18 20:05:33 UTC
Permalink
Blat version: 262
OS/Platform: Windows vista

I am building a C++ program (myCode.exe) using VS2005 VC++ IDE. In
the C++ code (myCode.cpp), I am invoking 'system' command to launch
blat mail:
---
sprintf (mcmd, "blat -body \"OK\" -subject \"ok\" -to ***@yahoo.com");
system (mcmd);
----
On vista, unless myCode.exe is in the same folder as blat.exe, the
program myCode.exe will fail with an error:
¡¥blat¡Š is not recognized as an internal or external command, operable
program or batch file.

Additional observations about this problem:
i) The error has nothing to do with the path of blat. I had blat in the
system32 folder, and system32 is in my PATH environment. At one
time, I even coded the full path of blat into the 'mcmd' used in the
system command. The same error was output. Evidently myCode.exe
can locate blat.exe, but it does not think that blat.exe is an executable,
unless blat.exe and myCode.exe are in the same folder.
ii) This problem only occurs on Windows vista. On Windows XP, the
system command can always recognize that blat is an exe and launch it,
whether blat is in the same folder or else.
iii) From a command prompt, I can always launch blat from any folder,
as long as the folder containing blat is on my search path. This is true
for both Windows XP and Windows vista.

Evidently, the problem exists ONLY when:
- OS is Windows vista, and
- blat is launched by system command from a C++ program, and
- C++ program executable and blat.exe are not in the same folder.

This forces me to install a copy of blat.exe in the same folder of the
executable of every C++ application that uses system command to
launch blat. This is not a good way to deploy software. If all possible, I
want to avoid it.

This is a Windows vista problem. A simple test can demonstrate it - On
a vista PC, make a copy of C:\Windows\system32\notepad.exe, and
rename the copy mynotepad.exe. One can successfully launch
mynotepad.exe from a command prompt from any folder, since
C:\windows\system32 is on user's search path. Now in the C++ code
(myCode.cpp), call mynotepad.exe instead of blat, and see what
happens:
Test 1: myCode.exe and mynotepad.exe in the same folder
(C:\windows\system32), with the syntax: system ("mynotepad"),
mynotepad comes up. It works.
Test 2: myCode.exe and mynotepad.exe in different folders, with the
syntax: system ("mynotepad"), the program returns an
error: "¡¥mynotepad¡Š is not recognized as an internal or external
command, operable program or batch file." And mynotepad fails to
come up.
Test 3: myCode.exe and mynotepad.exe in different folders, with the
syntax: system ("C:\\windows\\system32\\mynotepad.exe"), the program
returns an error: "¡¥C:\windows\system32\mynotepad¡Š is not
recognized as an internal or external command, operable program or
batch file." And mynotepad fails to come up.

Sure, this is a vista problem, not a blat problem. However, I have not
been able to get any resolution from vista blog site. I wonder if you have
seen this problem reported on blat, and can shed some light for me.

Any help will be appreciated.

-- Ann Fitchard
namtog
2008-04-19 20:12:05 UTC
Permalink
Greetings Ann Fitchard,

I do not recall seeing a post from you at the YGB
before so let me welcome you. Also let me thank
you for your well written and documented post.

Ann Fitchard wrote;
"Any help will be appreciated."

I'm hoping your definition of "any help" includes
a little.

At this point I can only confirm your issue. On
Vista Basic running in a virtual machine on Win XP Pro.

The problem I have is that Vista behaves correctly
(that is it will find Blat in Path) with what I have
to test. Batch script, Perl script and C. The examples
I (IB Test) used can be found at;

IB test.zip
Invoke Blat Test

http://tech.groups.yahoo.com/group/blat/files/Other/

The C example has source and compiled executable. It
calls blat.dll.

When testing on Vista I was admin.

What I need from you is a working complete example code,
both source and executable, that I can test. It need
only be a short demo that will call Blat. No need
to actually send a mail. In other words;

sprintf (mcmd, "blat");
system (mcmd);

Feel free to upload the example to the YGB files
section or email it directly to me.

It may boil down to something simple.

If the exe works as you describe on Vista I will
then try building it on VS.net 2003.

This way even tho I may not be able to help you
at least I can confirm your issue.

Namtog
***@yahoo.com
namtog at yahoo dot com
Chip
2008-04-20 23:39:38 UTC
Permalink
Post by annfitchard
Blat version: 262
OS/Platform: Windows vista
I am building a C++ program (myCode.exe) using VS2005 VC++ IDE. In the
---
system (mcmd);
----
<big snip>

Have you tried specifying .exe extension with Blat? I do not have Vista
here at home, virtual or otherwise, so I am unable to test this tonight.
--
Chip
Fitchard, Ann (PSAF)
2008-04-21 11:16:19 UTC
Permalink
Yes, I surely did. I called the executable by full path, and full file
name. It did not make any difference. - Ann



________________________________

From: ***@yahoogroups.com [mailto:***@yahoogroups.com] On Behalf Of
Chip
Sent: Sunday, April 20, 2008 6:40 PM
To: ***@yahoogroups.com
Subject: Re: [blat] Invoking blat from a C++ application
Post by annfitchard
Blat version: 262
OS/Platform: Windows vista
I am building a C++ program (myCode.exe) using VS2005 VC++ IDE. In the
---
<mailto:you%40yahoo.com> ");
Post by annfitchard
system (mcmd);
----
<big snip>

Have you tried specifying .exe extension with Blat? I do not have Vista
here at home, virtual or otherwise, so I am unable to test this tonight.
--
Chip





[Non-text portions of this message have been removed]
Fitchard, Ann (PSAF)
2008-04-22 03:22:50 UTC
Permalink
Sure enough, our email police intercepted the message I sent this
afternoon, because one of the attached files contained components not
allowed by Chevron (the exe's). So, I extracted the source files out of
blat-test.zip. I will attach the two source files instead of the
original compressed file which contained the 'exe's. It should go
through this time.



________________________________

From: Fitchard, Ann (PSAF)
Sent: Monday, April 21, 2008 3:57 PM
To: ***@yahoogroups.com; ***@yahoo.com
Cc: Fitchard, Ann (PSAF)
Subject: RE: [blat] Re: Invoking blat from a C++ application



Namtog,



Thank you for your quick response. Before opening the zip file that you
sent me, I will respond to your questions first.



Yes, this is the my first post. I am pleasantly surprised how active
this yahoo group is.



We are moving from Windows XP to vista. Thus I am inexperienced in
vista. However, I do have an elevated user privilege (admin) on my PC.




I built my applications in VS2005, because VS2003 is not supported on
Windows vista.



I will package up the exe's and send to you. Our outlook email police
may strip the exe's, though. In that case, you may want to use the
solution files to rebuild the exe's. Each solution has one single
source file (test1.cpp or test2.cpp). All the programs do is to call
'blat', then call 'notepad'. They are console programs, so each will
launch a dos command window first and dump some messages to the command
window. The reason of calling notepad is for preventing the dos window
from closing. That allows me to read the console messages. The console
won't close until I shut down 'notepad'.



My attachments are:

blat-tests.zip: contains two source files: test1.cpp, and test2.cpp, and
the corresponding exe's.

btest1.sln and btest2.sln



btest1.sln - the solution file for test1, in which I invoked blat by

system("blat -subject....");

And, my blat.exe resides in C:\Windows\System32

Listed below are the messages in the console:

blat -body "OK" -subject "ok" to ***@chevron.com

'blat' is not recognized as an internal or external command, operable
program or batch file.

Then, I moved a copy of blat.exe into the same folder where I have
test1.exe, and fired up test1.exe again. The following messages are
output:

blat -body "OK" -subject "ok" -to ***@chevron.com

Blat v2.6.2 w/GSS encryption <build : Feb 25 2007 12:06:19)

Sending stdin.txt to ***@chevron.com

Subject: ok

Login name is ***@chevron.com

And, I did receive a mail message. It worked when blat.exe and
test1.exe are in the same folder.

btest2.sln - the solution file for test2, the only difference between
test2.cpp and test1.cpp is that test2.cpp uses the full path of blat:

system("C:\\windows\\system32\blat.exe -subject....");

Listed below are the messages from test2:

C:\windows\system32\blat.exe -body "OK" -subject "ok" -to
***@chevron.com

'C:\windows\system32\blat.exe' is not recognized as an internal or
external command, operable program or batch file

So, test2 did find blat.exe. But it did not think blat.exe is an
executable.



One more question - In the future, do I send my messages pertaining this
problem to you or to the group?



Again, thank you for taking the time.



Ann Fitchard







From: ***@yahoogroups.com [mailto:***@yahoogroups.com] On Behalf Of
namtog
Sent: Saturday, April 19, 2008 3:12 PM
To: ***@yahoogroups.com
Subject: [blat] Re: Invoking blat from a C++ application



Greetings Ann Fitchard,

I do not recall seeing a post from you at the YGB
before so let me welcome you. Also let me thank
you for your well written and documented post.

Ann Fitchard wrote;
"Any help will be appreciated."

I'm hoping your definition of "any help" includes
a little.

At this point I can only confirm your issue. On
Vista Basic running in a virtual machine on Win XP Pro.

The problem I have is that Vista behaves correctly
(that is it will find Blat in Path) with what I have
to test. Batch script, Perl script and C. The examples
I (IB Test) used can be found at;

IB test.zip
Invoke Blat Test

http://tech.groups.yahoo.com/group/blat/files/Other/

The C example has source and compiled executable. It
calls blat.dll.

When testing on Vista I was admin.

What I need from you is a working complete example code,
both source and executable, that I can test. It need
only be a short demo that will call Blat. No need
to actually send a mail. In other words;

sprintf (mcmd, "blat");
system (mcmd);

Feel free to upload the example to the YGB files
section or email it directly to me.

It may boil down to something simple.

If the exe works as you describe on Vista I will
then try building it on VS.net 2003.

This way even tho I may not be able to help you
at least I can confirm your issue.

Namtog
***@yahoo.com <mailto:namtog%40yahoo.com>
namtog at yahoo dot com





[Non-text portions of this message have been removed]
namtog
2008-04-22 13:28:23 UTC
Permalink
Greetings,

I'm going to start this reply with the last comment
from Ann Fitchard;
"One more question - In the future, do I send my
messages pertaining this problem to you or to the
group?"

It's best to keep this on the YGB board. This way
both you and I can receive help from the rest of the
group. Plus even though you sent to;
To: ***@yahoogroups.com; ***@...
I have not received anything from you directly. I'm
responding to the YGB post.

It may not be your corporate email server stripping
out the exe's. The YGB does not support attachments.
Which is why I suggested uploading the examples to;

http://tech.groups.yahoo.com/group/blat/files/Other/

or any other location that all of us here could access.

If you would upload your file(s) blat-test.zip,
including the exe's this would expedite this issue
for all.


Ann Fitchard wrote;
"Before opening the zip file that you sent me,"
This (IB test.zip) was posted to the file section of YGB.
If you got a zip attachment in your email it was not
from me. Just to clarify this point.

Like you I am just getting acquainted with Vista. Over
the years, like many others, I got in the habit of
waiting for SP1 to be released before exploring a
new MS OS.

We will sort this can't find Blat in PATH issue out.

Namtog
Moore, Bruce
2008-04-22 12:32:07 UTC
Permalink
Ann
I send a lot of files between vendors and have found that renaming .EXE
file to .RENAMETOEXE bypasses most firewall policies.

Bruce Moore


________________________________

From: ***@yahoogroups.com [mailto:***@yahoogroups.com] On Behalf Of
Fitchard, Ann (PSAF)
Sent: Monday, April 21, 2008 11:23 PM
To: ***@yahoogroups.com; ***@yahoo.com
Subject: FW: [blat] Re: Invoking blat from a C++ application



Sure enough, our email police intercepted the message I sent this
afternoon, because one of the attached files contained components not
allowed by Chevron (the exe's). So, I extracted the source files out of
blat-test.zip. I will attach the two source files instead of the
original compressed file which contained the 'exe's. It should go
through this time.

________________________________

From: Fitchard, Ann (PSAF)
Sent: Monday, April 21, 2008 3:57 PM
To: ***@yahoogroups.com <mailto:blat%40yahoogroups.com> ;
***@yahoo.com <mailto:namtog%40yahoo.com>
Cc: Fitchard, Ann (PSAF)
Subject: RE: [blat] Re: Invoking blat from a C++ application

Namtog,

Thank you for your quick response. Before opening the zip file that you
sent me, I will respond to your questions first.

Yes, this is the my first post. I am pleasantly surprised how active
this yahoo group is.

We are moving from Windows XP to vista. Thus I am inexperienced in
vista. However, I do have an elevated user privilege (admin) on my PC.

I built my applications in VS2005, because VS2003 is not supported on
Windows vista.

I will package up the exe's and send to you. Our outlook email police
may strip the exe's, though. In that case, you may want to use the
solution files to rebuild the exe's. Each solution has one single
source file (test1.cpp or test2.cpp). All the programs do is to call
'blat', then call 'notepad'. They are console programs, so each will
launch a dos command window first and dump some messages to the command
window. The reason of calling notepad is for preventing the dos window
from closing. That allows me to read the console messages. The console
won't close until I shut down 'notepad'.

My attachments are:

blat-tests.zip: contains two source files: test1.cpp, and test2.cpp, and
the corresponding exe's.

btest1.sln and btest2.sln

btest1.sln - the solution file for test1, in which I invoked blat by

system("blat -subject....");

And, my blat.exe resides in C:\Windows\System32

Listed below are the messages in the console:

blat -body "OK" -subject "ok" to ***@chevron.com
<mailto:psaf%40chevron.com>

'blat' is not recognized as an internal or external command, operable
program or batch file.

Then, I moved a copy of blat.exe into the same folder where I have
test1.exe, and fired up test1.exe again. The following messages are
output:

blat -body "OK" -subject "ok" -to ***@chevron.com
<mailto:psaf%40chevron.com>

Blat v2.6.2 w/GSS encryption <build : Feb 25 2007 12:06:19)

Sending stdin.txt to ***@chevron.com <mailto:psaf%40chevron.com>

Subject: ok

Login name is ***@chevron.com <mailto:psar%40chevron.com>

And, I did receive a mail message. It worked when blat.exe and
test1.exe are in the same folder.

btest2.sln - the solution file for test2, the only difference between
test2.cpp and test1.cpp is that test2.cpp uses the full path of blat:

system("C:\\windows\\system32\blat.exe -subject....");

Listed below are the messages from test2:

C:\windows\system32\blat.exe -body "OK" -subject "ok" -to
***@chevron.com <mailto:psaf%40chevron.com>

'C:\windows\system32\blat.exe' is not recognized as an internal or
external command, operable program or batch file

So, test2 did find blat.exe. But it did not think blat.exe is an
executable.

One more question - In the future, do I send my messages pertaining this
problem to you or to the group?

Again, thank you for taking the time.

Ann Fitchard

From: ***@yahoogroups.com <mailto:blat%40yahoogroups.com>
[mailto:***@yahoogroups.com <mailto:blat%40yahoogroups.com> ] On Behalf
Of
namtog
Sent: Saturday, April 19, 2008 3:12 PM
To: ***@yahoogroups.com <mailto:blat%40yahoogroups.com>
Subject: [blat] Re: Invoking blat from a C++ application

Greetings Ann Fitchard,

I do not recall seeing a post from you at the YGB
before so let me welcome you. Also let me thank
you for your well written and documented post.

Ann Fitchard wrote;
"Any help will be appreciated."

I'm hoping your definition of "any help" includes
a little.

At this point I can only confirm your issue. On
Vista Basic running in a virtual machine on Win XP Pro.

The problem I have is that Vista behaves correctly
(that is it will find Blat in Path) with what I have
to test. Batch script, Perl script and C. The examples
I (IB Test) used can be found at;

IB test.zip
Invoke Blat Test

http://tech.groups.yahoo.com/group/blat/files/Other/
<http://tech.groups.yahoo.com/group/blat/files/Other/>

The C example has source and compiled executable. It
calls blat.dll.

When testing on Vista I was admin.

What I need from you is a working complete example code,
both source and executable, that I can test. It need
only be a short demo that will call Blat. No need
to actually send a mail. In other words;

sprintf (mcmd, "blat");
system (mcmd);

Feel free to upload the example to the YGB files
section or email it directly to me.

It may boil down to something simple.

If the exe works as you describe on Vista I will
then try building it on VS.net 2003.

This way even tho I may not be able to help you
at least I can confirm your issue.

Namtog
***@yahoo.com <mailto:namtog%40yahoo.com>
<mailto:namtog%40yahoo.com>
namtog at yahoo dot com

[Non-text portions of this message have been removed]






[Non-text portions of this message have been removed]
Fitchard, Ann (PSAF)
2008-04-28 13:21:22 UTC
Permalink
Thanks. I'll keep in mind. - Ann



________________________________

From: ***@yahoogroups.com [mailto:***@yahoogroups.com] On Behalf Of
Moore, Bruce
Sent: Tuesday, April 22, 2008 7:32 AM
To: ***@yahoogroups.com; ***@yahoo.com
Subject: RE: [blat] Re: Invoking blat from a C++ application



Ann
I send a lot of files between vendors and have found that renaming .EXE
file to .RENAMETOEXE bypasses most firewall policies.

Bruce Moore

________________________________

From: ***@yahoogroups.com <mailto:blat%40yahoogroups.com>
[mailto:***@yahoogroups.com <mailto:blat%40yahoogroups.com> ] On Behalf
Of
Fitchard, Ann (PSAF)
Sent: Monday, April 21, 2008 11:23 PM
To: ***@yahoogroups.com <mailto:blat%40yahoogroups.com> ;
***@yahoo.com <mailto:namtog%40yahoo.com>
Subject: FW: [blat] Re: Invoking blat from a C++ application

Sure enough, our email police intercepted the message I sent this
afternoon, because one of the attached files contained components not
allowed by Chevron (the exe's). So, I extracted the source files out of
blat-test.zip. I will attach the two source files instead of the
original compressed file which contained the 'exe's. It should go
through this time.

________________________________

From: Fitchard, Ann (PSAF)
Sent: Monday, April 21, 2008 3:57 PM
To: ***@yahoogroups.com <mailto:blat%40yahoogroups.com>
<mailto:blat%40yahoogroups.com> ;
***@yahoo.com <mailto:namtog%40yahoo.com>
<mailto:namtog%40yahoo.com>
Cc: Fitchard, Ann (PSAF)
Subject: RE: [blat] Re: Invoking blat from a C++ application

Namtog,

Thank you for your quick response. Before opening the zip file that you
sent me, I will respond to your questions first.

Yes, this is the my first post. I am pleasantly surprised how active
this yahoo group is.

We are moving from Windows XP to vista. Thus I am inexperienced in
vista. However, I do have an elevated user privilege (admin) on my PC.

I built my applications in VS2005, because VS2003 is not supported on
Windows vista.

I will package up the exe's and send to you. Our outlook email police
may strip the exe's, though. In that case, you may want to use the
solution files to rebuild the exe's. Each solution has one single
source file (test1.cpp or test2.cpp). All the programs do is to call
'blat', then call 'notepad'. They are console programs, so each will
launch a dos command window first and dump some messages to the command
window. The reason of calling notepad is for preventing the dos window
from closing. That allows me to read the console messages. The console
won't close until I shut down 'notepad'.

My attachments are:

blat-tests.zip: contains two source files: test1.cpp, and test2.cpp, and
the corresponding exe's.

btest1.sln and btest2.sln

btest1.sln - the solution file for test1, in which I invoked blat by

system("blat -subject....");

And, my blat.exe resides in C:\Windows\System32

Listed below are the messages in the console:

blat -body "OK" -subject "ok" to ***@chevron.com
<mailto:psaf%40chevron.com>
<mailto:psaf%40chevron.com>

'blat' is not recognized as an internal or external command, operable
program or batch file.

Then, I moved a copy of blat.exe into the same folder where I have
test1.exe, and fired up test1.exe again. The following messages are
output:

blat -body "OK" -subject "ok" -to ***@chevron.com
<mailto:psaf%40chevron.com>
<mailto:psaf%40chevron.com>

Blat v2.6.2 w/GSS encryption <build : Feb 25 2007 12:06:19)

Sending stdin.txt to ***@chevron.com <mailto:psaf%40chevron.com>
<mailto:psaf%40chevron.com>

Subject: ok

Login name is ***@chevron.com <mailto:psar%40chevron.com>
<mailto:psar%40chevron.com>

And, I did receive a mail message. It worked when blat.exe and
test1.exe are in the same folder.

btest2.sln - the solution file for test2, the only difference between
test2.cpp and test1.cpp is that test2.cpp uses the full path of blat:

system("C:\\windows\\system32\blat.exe -subject....");

Listed below are the messages from test2:

C:\windows\system32\blat.exe -body "OK" -subject "ok" -to
***@chevron.com <mailto:psaf%40chevron.com>
<mailto:psaf%40chevron.com>

'C:\windows\system32\blat.exe' is not recognized as an internal or
external command, operable program or batch file

So, test2 did find blat.exe. But it did not think blat.exe is an
executable.

One more question - In the future, do I send my messages pertaining this
problem to you or to the group?

Again, thank you for taking the time.

Ann Fitchard

From: ***@yahoogroups.com <mailto:blat%40yahoogroups.com>
<mailto:blat%40yahoogroups.com>
[mailto:***@yahoogroups.com <mailto:blat%40yahoogroups.com>
<mailto:blat%40yahoogroups.com> ] On Behalf
Of
namtog
Sent: Saturday, April 19, 2008 3:12 PM
To: ***@yahoogroups.com <mailto:blat%40yahoogroups.com>
<mailto:blat%40yahoogroups.com>
Subject: [blat] Re: Invoking blat from a C++ application

Greetings Ann Fitchard,

I do not recall seeing a post from you at the YGB
before so let me welcome you. Also let me thank
you for your well written and documented post.

Ann Fitchard wrote;
"Any help will be appreciated."

I'm hoping your definition of "any help" includes
a little.

At this point I can only confirm your issue. On
Vista Basic running in a virtual machine on Win XP Pro.

The problem I have is that Vista behaves correctly
(that is it will find Blat in Path) with what I have
to test. Batch script, Perl script and C. The examples
I (IB Test) used can be found at;

IB test.zip
Invoke Blat Test

http://tech.groups.yahoo.com/group/blat/files/Other/
<http://tech.groups.yahoo.com/group/blat/files/Other/>
<http://tech.groups.yahoo.com/group/blat/files/Other/
<http://tech.groups.yahoo.com/group/blat/files/Other/> >

The C example has source and compiled executable. It
calls blat.dll.

When testing on Vista I was admin.

What I need from you is a working complete example code,
both source and executable, that I can test. It need
only be a short demo that will call Blat. No need
to actually send a mail. In other words;

sprintf (mcmd, "blat");
system (mcmd);

Feel free to upload the example to the YGB files
section or email it directly to me.

It may boil down to something simple.

If the exe works as you describe on Vista I will
then try building it on VS.net 2003.

This way even tho I may not be able to help you
at least I can confirm your issue.

Namtog
***@yahoo.com <mailto:namtog%40yahoo.com>
<mailto:namtog%40yahoo.com>
<mailto:namtog%40yahoo.com>
namtog at yahoo dot com

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
John Mann DDPMOSTL
2008-09-24 21:55:33 UTC
Permalink
Upgrade from Vista to XP. Everyone's doing it.

________________________________
From: ***@yahoogroups.com [mailto:***@yahoogroups.com] On Behalf Of annfitchard
Sent: Friday, April 18, 2008 3:06 PM
To: ***@yahoogroups.com
Subject: [blat] Invoking blat from a C++ application


Blat version: 262
OS/Platform: Windows vista

I am building a C++ program (myCode.exe) using VS2005 VC++ IDE. In
the C++ code (myCode.cpp), I am invoking 'system' command to launch
blat mail:
---
sprintf (mcmd, "blat -body \"OK\" -subject \"ok\" -to ***@yahoo.com<mailto:you%40yahoo.com>");
system (mcmd);
----
On vista, unless myCode.exe is in the same folder as blat.exe, the
program myCode.exe will fail with an error:
¡¥blat¡Š is not recognized as an internal or external command, operable
program or batch file.

Additional observations about this problem:
i) The error has nothing to do with the path of blat. I had blat in the
system32 folder, and system32 is in my PATH environment. At one
time, I even coded the full path of blat into the 'mcmd' used in the
system command. The same error was output. Evidently myCode.exe
can locate blat.exe, but it does not think that blat.exe is an executable,
unless blat.exe and myCode.exe are in the same folder.
ii) This problem only occurs on Windows vista. On Windows XP, the
system command can always recognize that blat is an exe and launch it,
whether blat is in the same folder or else.
iii) From a command prompt, I can always launch blat from any folder,
as long as the folder containing blat is on my search path. This is true
for both Windows XP and Windows vista.

Evidently, the problem exists ONLY when:
- OS is Windows vista, and
- blat is launched by system command from a C++ program, and
- C++ program executable and blat.exe are not in the same folder.

This forces me to install a copy of blat.exe in the same folder of the
executable of every C++ application that uses system command to
launch blat. This is not a good way to deploy software. If all possible, I
want to avoid it.

This is a Windows vista problem. A simple test can demonstrate it - On
a vista PC, make a copy of C:\Windows\system32\notepad.exe, and
rename the copy mynotepad.exe. One can successfully launch
mynotepad.exe from a command prompt from any folder, since
C:\windows\system32 is on user's search path. Now in the C++ code
(myCode.cpp), call mynotepad.exe instead of blat, and see what
happens:
Test 1: myCode.exe and mynotepad.exe in the same folder
(C:\windows\system32), with the syntax: system ("mynotepad"),
mynotepad comes up. It works.
Test 2: myCode.exe and mynotepad.exe in different folders, with the
syntax: system ("mynotepad"), the program returns an
error: "¡¥mynotepad¡Š is not recognized as an internal or external
command, operable program or batch file." And mynotepad fails to
come up.
Test 3: myCode.exe and mynotepad.exe in different folders, with the
syntax: system ("C:\\windows\\system32\\mynotepad.exe"), the program
returns an error: "¡¥C:\windows\system32\mynotepad¡Š is not
recognized as an internal or external command, operable program or
batch file." And mynotepad fails to come up.

Sure, this is a vista problem, not a blat problem. However, I have not
been able to get any resolution from vista blog site. I wonder if you have
seen this problem reported on blat, and can shed some light for me.

Any help will be appreciated.

-- Ann Fitchard

This electronic message is from Delta Dental of Missouri. It may
contain confidential or privileged information. If you received this
transmission in error, please reply to the sender to advise of the error
and delete this transmission and any attachments. This footnote also
confirms that this email message has passed IRONPORT email security
for the absence of viruses.


[Non-text portions of this message have been removed]

Continue reading on narkive:
Loading...