471,079 Members | 928 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,079 software developers and data experts.

Problem with Shell Command in VB 5.0

I have this line in my code that spits out (run time error 53, file
not found).
Running this program (project.exe) works fine if I do it through the
command prompt or Run dialogue box on the Windows XP start menu, but
not when using the shell command
This is my code

dim retval
retval = Shell("d:\batch_files\task_management\project\proj ect.exe",1)

Thanks
Jul 17 '05 #1
1 3987
> I have this line in my code that spits out (run time error 53, file
not found).
Running this program (project.exe) works fine if I do it through the
command prompt or Run dialogue box on the Windows XP start menu, but
not when using the shell command
This is my code

dim retval
retval = Shell("d:\batch_files\task_management\project\proj ect.exe",1)


Does the project.exe program (seems strange that you have an EXE file in
a directory whose name kind of indicates it contains only BAT files)
itself attempt to open or run any files or programs? If so, perhaps it
is using a relative path when attempting to do so. If that is the case,
you should be able to use ChDrive and ChDir to set the working path to
that which this (these) internally called file(s) require(s). You would
execute these function calls prior to executing the Shell statement.

Rick - MVP

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Trevor Fairchild | last post: by
reply views Thread by Pedro Werneck | last post: by
2 posts views Thread by Xah Lee | last post: by
10 posts views Thread by Siemel Naran | last post: by
2 posts views Thread by jcrouse | last post: by
5 posts views Thread by Chris Austin | last post: by
2 posts views Thread by Stewart Midwinter | last post: by
reply views Thread by Stewart Midwinter | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.