Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 13-03-2007, 01:04 PM   #1 (permalink)
Mad and Furious
 
redhat's Avatar
 
Join Date: May 2006
Location: Visual Basic 6.0
Posts: 453
Smile how to execute an exe file from Visual Basic 6.0


Hi friends,
I am making a progam in VB. I need to execute an exe application that I made in VB. I need to execute it since, adding the source for 10 apps into one, is very difficult and will hog system memory. So, I want to know how to execute an exe file from an app made in VB 6.0. I am not very familiar with API's, but if you tell me the process, I will easily understand it.
Thank You in advance
__________________
My new Tech Blog : http://technewspaper.blogspot.com/
redhat is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 13-03-2007, 02:32 PM   #2 (permalink)
Wise Old Owl
 
The Unknown's Avatar
 
Join Date: Nov 2006
Location: Pune, Maharashtra, India
Posts: 1,728
Default Re: how to execute an exe file from Visual Basic 6.0

Quote:
Originally Posted by redhat
Hi friends,
I am making a progam in VB. I need to execute an exe application that I made in VB. I need to execute it since, adding the source for 10 apps into one, is very difficult and will hog system memory. So, I want to know how to execute an exe file from an app made in VB 6.0. I am not very familiar with API's, but if you tell me the process, I will easily understand it.
Thank You in advance
Wait for some VB ppl. And ur name is redhat but ur logo is not redhat!
__________________
KDE on ArchLinux
PHP, MySQL, PostgreSQL, Linux, Apache; Message me to hire (freelancing only)
Explore Technology @ http://www.itech7.com
Cheap and Reliable VPS Hosting @ http://j.mp/arHk5e
The Unknown is offline  
Old 14-03-2007, 10:20 AM   #3 (permalink)
Alpha Geek
 
Join Date: Jan 2007
Location: In your hearts
Posts: 828
Default Re: how to execute an exe file from Visual Basic 6.0

Hey friend tell me which type of project you want to make. Post here so that I can easily help you.
abhijangda is offline  
Old 14-03-2007, 10:35 AM   #4 (permalink)
Mad and Furious
 
redhat's Avatar
 
Join Date: May 2006
Location: Visual Basic 6.0
Posts: 453
Smile Re: how to execute an exe file from Visual Basic 6.0

I want to execute a particular exe file when the user selects an option from the menu. These are just add-ons and are not related to the program itself.
__________________
My new Tech Blog : http://technewspaper.blogspot.com/
redhat is offline  
Old 14-03-2007, 10:44 AM   #5 (permalink)
Human Spambot
 
Kiran.dks's Avatar
 
Join Date: Apr 2006
Location: Pune, India
Posts: 2,501
Default Re: how to execute an exe file from Visual Basic 6.0

Quote:
Originally Posted by redhat
Hi friends,
I am making a progam in VB. I need to execute an exe application that I made in VB. I need to execute it since, adding the source for 10 apps into one, is very difficult and will hog system memory. So, I want to know how to execute an exe file from an app made in VB 6.0. I am not very familiar with API's, but if you tell me the process, I will easily understand it.
Thank You in advance
Simple. Execute the exe file directly from Command line. Use shell or ShellExecute. See that you give the exact location of the exe.
__________________
Kiran Kumar R

Last edited by Kiran.dks; 14-03-2007 at 11:53 AM.
Kiran.dks is offline  
Old 14-03-2007, 11:12 AM   #6 (permalink)
Human Spambot
 
Join Date: Nov 2004
Location: Madurai
Posts: 2,349
Default Re: how to execute an exe file from Visual Basic 6.0

Hope this helps: http://www.dreamincode.net/code/snippet276.htm

Arun
sakumar79 is offline  
Old 17-03-2007, 02:28 PM   #7 (permalink)
Mad and Furious
 
redhat's Avatar
 
Join Date: May 2006
Location: Visual Basic 6.0
Posts: 453
Default Re: how to execute an exe file from Visual Basic 6.0

Quote:
Hope this helps: http://www.dreamincode.net/code/snippet276.htm

Arun
Thanks a lot,
It worked well for me
__________
Hi!
I am having a problem in using the "%Systemroot%" to refer to the "C"\Windows" directory.
I used to following code as suggested by sakumar79:
Code:
Dim RetVal
RetVal = Shell("%Systemroot%\System32\calc.exe", 1)
Please tell me where am I wring???
__________________
My new Tech Blog : http://technewspaper.blogspot.com/

Last edited by redhat; 17-03-2007 at 02:28 PM. Reason: Automerged Doublepost
redhat is offline  
Old 17-03-2007, 05:24 PM   #8 (permalink)
Human Spambot
 
Join Date: Nov 2004
Location: Madurai
Posts: 2,349
Default Re: how to execute an exe file from Visual Basic 6.0

Try
Dim RetVal
RetVal = Shell(""%Systemroot%\System32\calc.exe"", 1)

Or
Dim winPath as string
Dim RetVal
winPath = Environ$("SystemRoot")
RetVal = Shell(winPath & "\System32\calc.exe"", 1)

Arun
sakumar79 is offline  
Old 17-03-2007, 06:32 PM   #9 (permalink)
Mad and Furious
 
redhat's Avatar
 
Join Date: May 2006
Location: Visual Basic 6.0
Posts: 453
Thumbs up Re: how to execute an exe file from Visual Basic 6.0

Thanks a lot sakumar79
__________________
My new Tech Blog : http://technewspaper.blogspot.com/
redhat is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Sujeet
- by Krow
- by abhidev
- by topgear

Advertisement




All times are GMT +5.5. The time now is 07:41 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2