CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Need help with SHELL function, works in one pgm. I wrote but not in another

  1. #1
    Join Date
    Apr 2020
    Posts
    2

    Question Need help with SHELL function, works in one pgm. I wrote but not in another

    I have 2 VB6 programs where I used this statement:

    Shell "C:\MULTIZONE\usb-dio24-ctr6 install(24).exe"

    Both programs are run using the same statement on the same machine in the same environment. . It works in one program but the other gives a path not found error.

    I have looked at the REFERENCES for VB6 in both programs and they are both configured alike. Is there some other hidden thing in VB6 operation that I am overlooking?

    Any help will be greatly appreciated.

  2. #2
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,354

    Re: Need help with SHELL function, works in one pgm. I wrote but not in another

    Are you sure the line is exactly the same in both programs?
    Are you sure that is the line that is throwing the error?

    Could it be that the program you are shelling is looking for a specific folder that is in the current path for one but not the other?
    Always use [code][/code] tags when posting code.

  3. #3
    Join Date
    Apr 2020
    Posts
    2

    Re: Need help with SHELL function, works in one pgm. I wrote but not in another

    Quote Originally Posted by DataMiser View Post
    Are you sure the line is exactly the same in both programs?
    Are you sure that is the line that is throwing the error?

    Could it be that the program you are shelling is looking for a specific folder that is in the current path for one but not the other?
    Thanks for the reply. Yes the line is the same. It was copied CTRL=C, CTRL-V. I know its the line throwing the error because I stepped through it in debug. Also, If i eliminate the line everything else runs fine. The program I'm trying to Shell-run is an instillation program the sets up drivers for a digital I'O system it doesn't look back to my software for anything. It is crazy! I was thinking it must be some kind of attribute in the VB6 Project definition but I couldn't find any differences in my two programs.

  4. #4
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,354

    Re: Need help with SHELL function, works in one pgm. I wrote but not in another

    Well the path not found is a pretty specific error. If the shell statement is throwing that error then I would suspect there is a problem with the path or filename in that statement. Otherwise it could be coming from the installer and may be related to the current directory location and the installer being unable to find the path it wants.
    Always use [code][/code] tags when posting code.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)