Results 1 to 10 of 10

Thread: Execute DOS commands from VB6

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2023
    Posts
    2

    Execute DOS commands from VB6

    Hello, I have 2 questions, i'm not sure if it's even possible but if I'm wrong please correct me.

    So, i want to run my .exe file in cmd via vb6, is it possible?

    And second,if it's possible to run, how can I locate my file, what do I mean? for example this exe, could be saved on the desktop with name test1.exe, but also could be saved in folder downloads with name test2.exe.

  2. #2
    Addicted Member
    Join Date
    May 2012
    Location
    42.787034,-81.176367
    Posts
    133

    Re: Execute DOS commands from VB6

    A search of this forum found these threads;

    https://www.vbforums.com/showthread....B6-application
    https://www.vbforums.com/showthread....-shell-command

    This is from the Visual Basic 6.0 Help File (online version)
    https://learn.microsoft.com/en-us/pr...42087(v=vs.60)

    Joe

  3. #3
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,708

  4. #4
    The Idiot
    Join Date
    Dec 2014
    Posts
    2,730

    Re: Execute DOS commands from VB6

    this stinks malicious attempts.

    - locate a file
    - run it

    why do u need stuff like that?
    if u are creating a project, all the files are in setup-archive.

  5. #5
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,708

    Re: Execute DOS commands from VB6

    Yes, it's entirely unheard of for one app to launch another outside of malware...

  6. #6
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,250

    Re: Execute DOS commands from VB6

    For the uninitiated Faf's comment was sarcasm.

    Baka, for your information, my apps do almost nothing else but initiate other apps.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  7. #7

    Thread Starter
    New Member
    Join Date
    Mar 2023
    Posts
    2

    Re: Execute DOS commands from VB6

    Quote Originally Posted by fafalone View Post
    Yes, it's entirely unheard of for one app to launch another outside of malware...
    Unfortunately, you are wrong, even if you wish you were right. I never thought that vb6 could be used for this kind of purpose.

  8. #8
    The Idiot
    Join Date
    Dec 2014
    Posts
    2,730

    Re: Execute DOS commands from VB6

    why do u need to "locate" your own executable?

    the "only" reason I would ever do it (non-malware)

    - a cleanup tool, to remove an old project that is not using the register, need to scan and delete.
    - a manager-tool, that will scan for programs that the manager-tool will use for something.
    - nothing that I can think of
    - please give suggestions what u would need such thing

    run a program from cmd, why?

    - if I have little knowledge of programming and how to run it directly from VB6
    - cmd is usually used to run .bat files (even if we can do it from VB6)
    - cmd is something that is well known and easy to use.

    if I have a program that I want to share, why do I need to locate my own program. what program? whats the purpose?

    yeah, it could be legit, but it still stinks malware attemps.
    if u can not see it, its your problem, not mine.

  9. #9
    PowerPoster
    Join Date
    Nov 2017
    Posts
    3,138

    Re: Execute DOS commands from VB6

    Quote Originally Posted by denis1315 View Post
    Hello, I have 2 questions, i'm not sure if it's even possible but if I'm wrong please correct me.

    So, i want to run my .exe file in cmd via vb6, is it possible?

    And second,if it's possible to run, how can I locate my file, what do I mean? for example this exe, could be saved on the desktop with name test1.exe, but also could be saved in folder downloads with name test2.exe.
    Regarding the first question, you can "Shell" something like this:

    cmd /c "C:\Path\To\File.exe"

    Regarding the second question, remove VB6 and code from the equation. How would YOU find your file on a computer if you don't know what the filename is or where it might be stored?

  10. #10
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,936

    Re: Execute DOS commands from VB6

    *just shakes head*
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

Posting Permissions

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



Click Here to Expand Forum to Full Width