Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-23-2003, 08:25 PM
Darwin Darwin is online now
Registered User
 
Join Date: 12-23-2003
Posts: 2
Question Batch file can't find program

I have a project step that invokes a batch file. However, when the batch file runs, it's unable to locate an executable even though it's part of the PATH. Is the PATH being ignored?

Here's the Run Program proerties:
Command: %DOSCMD% c:\temp\test.bat
Start in: c:\temp
Read Output From: Standard output

Here's the test.bat batch file:
python.exe

python.exe is located in c:\util\python which is in the PATH. It can be invoked from the command prompt in any directory.

thx.
-Darwin
Reply With Quote
  #2  
Old 12-23-2003, 11:20 PM
kevina kevina is online now
Registered User
 
Join Date: 03-27-2003
Posts: 825
This works for me in testing. Did you add the path to python.exe to your path after starting visual build pro? If so, you will need to restart VBP for it to know about the path change (just like any other application or command prompt).

Another way to verify that VBP knows about the path is add the PATH statement to your batch file (it will print the path to the Visual Build Pro log).

Kevin
Reply With Quote
  #3  
Old 12-24-2003, 02:31 PM
Darwin Darwin is online now
Registered User
 
Join Date: 12-23-2003
Posts: 2
- VBP was started after the PATH was modified.

- Adding PATH to the batch file shows that c:\util\python is there.

- I'm running VBP 4.6b
Reply With Quote
  #4  
Old 01-06-2004, 11:36 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Something must be missing, but I'm not sure what. I tried a similar test here:

1) Installed ActivePython 2.3.2.232 to C:\Python (it added C:\Python, where Python.exe was copied, to the PATH environment variable).

2) Created c:\temp\test.bat with contents 'python.exe'

3) Created c:\ptest.bld with contents
<step action='Run Program' type='0'>
<command>%DOSCMD% c:\temp\test.bat</command>
<name>New Step</name>
<outputfrom type='3'>1</outputfrom>
<startin>c:\temp</startin>
</step>

4) Built ptest.bld. Output:
Building project step 'New Step'...

c:\temp>python.exe
Build successfully completed.

5) Moved C:\Python\Python.exe to c:\ and rebuilt ptest.bld. Output:
Building project step 'New Step'...

c:\temp>python.exe
'python.exe' is not recognized as an internal or external command,
operable program or batch file.

Process completed with exit code 1
Step 'New Step' failed
Build ended.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 06:25 PM.


Copyright © 1999-2023 Kinook Software, Inc.