Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

2 Exes Synchronously

hi all,

i've say 2 exe's and i want to call them from VB program, with the second one getting fired after first one.

any ideas?

thanks in advance

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Call A Dll Synchronously
How can I call a method in a dll and make it execute synchronously. I need the dll process to finish before I continue with the rest of my code

Need To Run A Command Synchronously
Hi all,

I need to be able to run a MS-DOS command line executable from within my VB program, and I need it to run SYNCHRONOUSLY, not asynchronously. To add to the fun, I need to know how to capture a code returned by the call.
The Command line EXE is the IfMember.exe included with the W2k resource kit, and I need to know how to set a variable to be true each time the exe returns a true value.

I tried to do this with the shell command just to make sure I could get it to work, and it ran, but the shell is asynchronous and it also just returns what looks like a pid, not the value of the actual function.

Does anyone know any other methods besides the SHELL command? How do I get the value returned by the function, and not the pid?

Using Shell() To Execute Synchronously
Is it possible to force your program to halt further code execution upon performing a Shell()? It says this in MSDN:

Note By default, the Shell function runs other programs asynchronously. This means that a program started with Shell might not finish executing before the statements following the Shell function are executed.

I need to run 3 separate batch files but not running at the same time. What command or switch can I use to Shell each one and wait until it's completed?


Running Shell Synchronously
Hi all,

Does anyone know how to run the shell command synchronously. I need to wait for the application I'm shelling to finish!

Thanks in advance

Changing ColumnWidth For Two Listviews Synchronously
How can I change the column width in two listview controls synchronously?

I do have two listviews, one with column header visible and one hidden column header. Grid view is enabled for both listviews.

Now the problem:

If the user change the column width in the first listview, this change must be performed also for listview2 automatically

Something like:

listview2.columnheader(x).width = listview1.columnheader(x).width
How can I check whether the a columnwidth is changed in the first listview?

Any idea


How To List The Files To The Label Synchronously
i have 2 folders (folder A and folder B) with same file name. (totally i got 10 files for each folder)
i have 2 labels (labelA and labelB)

how to display the file name to the labelA and labelB synchronously.
As show as below:

labelA=file1 labelB= file1
after that:
labelA=file2 labelB= file2
... and so on

Edited by - wtkm on 4/23/2007 5:03:52 AM

Executing A Batch File Synchronously
Please give me a worked example of OpenProcess, WaitForSingleObject and CloseProcess.

My purpose is to execute a Batch file and wait till it completes execution and then only move further.

I have already tried with some example given by somebody here but it didn't work. Please give me the code which is tested.

Thanks in advance.


Updating Form Data Synchronously
I have a program which gathers a lot of data from a remote database and then processes the information. On my main form I have a series of labels that are updated when each new process is running to let the user know what is going on.

However, it is possible for the user to request such a large amount of data to process that the first function alone may take 5 minutes. I decided to add a timer that goes off every second to update an elapsed time display in the corner of the form. This timer is enabled at the start of the function and the begin time is set globally. Then in the timer event function it gets the minutes and seconds elapsed and updates a label caption. The label is not being updated on the screen however. I tested the code to make sure it is working properly and it is. Here is the timer event function:

private Sub Timer1_Timer()
Dim nMinutes as Integer, nSeconds as Integer
Dim sTime as string

nMinutes = Minute(time - TimeBegin)
nSeconds = Second(time - TimeBegin)

sTime = nMinutes & ":"
If nSeconds &lt; 10 then sTime = sTime & "0"
sTime = sTime & nSeconds

lblTime.Caption = sTime
End Sub

TimeBegin is obviously a TimeDate object containing the start time.

Is there any reason why the label should not be updated every second like it is set to do?

The majority of the time is spent waiting for an SQL query to return from the server. This could be sped up by setting up better indexes on the Table but that is not up to me to do and this is only a management reporting tool that is not time-critical.


How can i make a command button run an exe file?

2 Exes In One Distribution
Is there any reason that onyone nows of why I can't distribute 2 exe's for one program - the reason being that I use a program called startxx to look in a folder for a newer verison of my program.exe or reports used by the program, the start program loads the newer files and then launches the program. I want to package and deploy them both in one go and have them both in the same app folder.

Help With Distributing EXEs
I have made a EXE of a program which includes a database, and when I distribute it, the people who try to run it keep getting the error saying "cannot find database".

Someone told me that on the Form Load, I need to put something like App.Path, so no matter where the database is on someone elses computer, my project will still find it.

Can someone help?

Compiling Exes

I have written my application and all is fine and dandy. The only thing is that it wont run on any PC which doesn't already have VB installed on it. Is there a way of compiling it such that all the required files are attached with the executable?

Many thanks for your help.

Trouble With Exes
Is There a program, where you don't have to have VB 6, but you can make exes from forms? I had VB in school, but my computer sux, and can't support it, but have programs that I could make exes and play. If anyone has such a program please send it to me, thank you

VB Functions And .net Exes
What’s the comparable speed between a VBA function and .net exe files?

My Old EXEs Don't Work
Hi. My question isn't a coding one. It's about the EXEs I have made with VB5. I had no problem opening them before. However, I recently formatted my pc and I have reinstalled VB5 on it. However, I can't seemed to open the EXEs I have previously made with VB5. These EXEs were different beta versions of my game to see how it was progressing. I actually had to open up my project and recompile the lastest version I was working on and it works fine. However, when I try to open the old EXEs, I get a MSGBOX telling me "unexpected error" and once I click OK, it closes. Anyone ever have this problem?

I have winXP SP2, which I had before.

DLL File For EXEs
Whenever I make an EXE of a program and copy it to another computer, I must include the DLL file (VB40032.dll) in the folder with the program, or it won't run. I was just wondering, is this always the case with all EXEs you make? Can you make one that doesn't require a DLL to run on other computers? It would be nice to just have the application itself and nothing else.

Icons For EXEs
Can anyone create an icon for me, i'll attach the picture I want to be a 32x32 icon

Mdi Forms && Exes
Hi!I'm a newbie in vb 6.0 & i have a couple of questions:
1. How can i make to disappear that edge on the right adn at the bottom of my form?(i can see a little edge from my parrent form,but i don't want to be seen that-what should i do?)
2. I made a txt file & closed it & i want to code it using an external exe made in pascal(it is easier for me..),but even though i run the exe,it doesn't do anything...any idea why?how can i fix it?

Creating .exes
Created my first project and have read many a place that to create . exe file all you have to do is goto File->Make "Project Name" , but in my File Menu both the Make options are not available to click on (They are there but are not selectable ) Any ideas?

Im sure i created the project as a standard .exe file and this has been confirmed by a properties window i came across!

I have Visual Basic 5.0 and i have a feeling this may be part of problem perhaps i am wrong

Any Help Appreciated


How To Get 2 VB EXEs Talking 2 Each Other
What is the best way to get 2 executables (both written in VB6) talking to each other?

I would imagine it would be DDE although the VB help only seems to describe how to communicate with something like Excel.

What do I have to do in the destination app to get it ready to recieve DDE events?

A small example would be excellent.


Can I Get Source From VB Exes?
Hi Everybody,
Wish you all a Fabulous 2004.
I am looking for a tool which can generate source code from OCX or EXE files of VB. First of all, am I thinking too far, if no then could you please give me details of where to find it and how to buy it. Any help will be greatly appriciated.

Arvind Sharma

How Should I Attach 2 EXEs Together???

I have a file called 1.exe which does task A.
I have another file called 2.exe which does task B.

how can I attach these 2 files together into, lets say, 3.exe.

so the new file 3.exe will do task A, and after task A is finished, do task B.

Thanks in Advance.

How Can I Make EXEs?
I don't know how can i run my programs in which VB is not installed (shows error messages like missing some DLLs).
I know how to make my project a "Package".But it take huge size.So can you suggest any method on "vb Run time ...".

Running Exes From VB
I what to run another exe from my vb program via code, is this possible?

Error With EXEs
when ever i run my exes on a computer that doenst have VB on it, there is always a messege like "MSWINSOCK.OCX misssing" where can u download, or how can u put them on the computers that need them to run my EXE? thanks in advance

Creating EXEs
I am wanting to compile my VB program into a .EXE file.

The program is called Update.vbp but when I go to the file menu it has an option "Make delete.exe...." ( delete is the name of a previous program that I wrote )

I can choose this option and then create update.exe but when I use the Package and Deployment wizard it says that it is looking for delete.exe.

What is going on?


What R ActiveX EXEs For?
I assume you include them in a rugular program like a control, but I'm not shure.

Icons For Exes
ok, I made a icon that I want to use for my exe, how can I show my icon then that defalte icon??

How To Run EXEs From Another Program
what is the function to run an exe from within another program, say you wanted to make something like a launch bar.

Thanks in advance.

Again One Application Many .exes
Can I build a single VB-application which contains more than one Vb-Project and therefore more than one .exe file chaining each other (like old basic compiler CHAIN statement)?
I'm sorry for my bad English, thanks.

Customizable EXEs?
If i try to explain what i want in normal terms i'll probably screw it up and no-one will understand me. So i'll explain by example.

I want to start a web service. This web service is free to join. Once you are a member, you can download an EXE file. Every users' EXE file is embedded with that particular users' User ID, so when they run the EXE file, they don't have to enter a user ID, even when running it for the first time.

This site has something similar to what I want to achieve:


Building Exes.....
Here's something I've never done before but have heard it's not easy.

Here where I work I have been given permission to create a front end (VB 6) for someone in another department.  What do I do to create the exe and deploy it on another machine?  It'll probably start off on this individual's PC but may eventually be used on a network so knowing how to do both would be very helpful.  This person does not have VB on their machine.

It'll be accessing SQL Server and have several References such as OLE, ActiveX Data Object, Scripting, VBA and Excel to name a few.

I'll need to have some kind of explanation as to how I'll be doing this. I would love to just try to do everything myself but it's not like I can take up time on this other person's PC experimenting.  

Any advice?

Creating Exes From IDE
I seem to be getting this;

Under XP and earlier an exe compiled under the IDE reliably saved to to the path previously used and saved in the project's .vbp file, under Vista it does not. It appears to be saved to the folder specified in the last used save-as dialog.

Opening .EXEs From VB
I'm working on an application which must open two .EXE files (parent child processes). I am not familiar with the VB code to open another program. Can someone help me out?

Launching EXEs From VB
I have been searching ti see if there is a way that I can launch an EXE(a game, Office program, other compressed VB EXEs, any executable)from a VB6 program

Communication Between Two EXEs

I have two client applications calling the same ActiveX exe server app. Let's say Client1.exe, Client2.exe and Server.exe. We do not want the two client application run at the same time, so I need to add a check in Client1.exe, and make sure Client2.exe is not running. If so, I need to stop Client2 because Client2 is not so important as Client1. However, if Client1 is not running, CPU is free for Client2, I want to start Client2 automatically, like a watch dog.

Do you think it is possiable?


Resources & EXEs
I need to use the code found at in a VB EXE. I have no idea how to use that code in VB! Can anyone help?


Deploying EXEs
I've built a client/server application (as standard EXEs) with two executables, the client and the server, using some third-party controls which handle the TCP/IP stuff. I intend to run both the client and the server on the same machine.

Would it be sufficient to simply compile the two EXEs and copy them to the target machine, without doing anything else regarding the third-party controls i used in the two executables?


Get bungloads of cash. Bungloads.

Exes Controlling Others
I have two VB6apps, essentially different versions of the same app. I wish to write a third which when run, does nothing more than scrutinises, say, a database and runs the exe most appropriate. The idea being that I can then distribute all three at once, since users' circumstances will change.
The database stuff is no problem, but what is the simplest way to run an exe from another?

VBA To Open .EXEs In MS Word

I'm a bit of a VB newbie and need some help. I have built a filemanagement utility coding with Macromedia's Lingo. I want to be able to open this utility from Word itself using the Tools menu.

What would be the best way of achieving this?

I am familiar with JavaScript/dHTML/Perl/Lingo, are any any of these helpful in orientating a framework to work with VBA?

I don't really have time to learn VBA from the ground up, so access to a macro or an example scipt would be really helpful.



Combine Exes To One Program
i am wondering can this be done. currently i made a program that needs a reference from another program to work, so i have to link the program to the exe but instead of doing that is it possible to combine the exe then load it by from inside the exe or something???

-my bad still noob in training

Tutorial/Help On ActiveX EXEs

Does anyone have any good sites on where I can find details on Automation and how to write ActiveX EXEs?



Automation And ActiveX EXEs

I've written a simple VB app which is an ActiveX EXE. This app is automated by another app written in VC++. This means I can drive my VB app from the VC++ app GUI. This works great. However, what I am trying to achieve is a 'two-way' link between the apps so that I can do something in my VB app that makes the VC++ app do something. I realise this isn't a simple answer but could someone please point me in the right direction?

Many thanks


Getting Arguements In VB Created Exes
HI All,
This might be a very simple solution staring me in the face but I am not sure how to do it. I am trying to write an exe file to do some database writes/updates/read and some other tasks in a console based exe file with arguements being passed in on the command line as shown below:

c:Vbsample.exe %variable 1 %variable2

Does anyone know how to do this?

Thanks a million!

Question About Making .exes
When you start a project in VB6.0 you can choose standard exe right? But after I've worked on my project I have several files, forms, and graphics in which none of them are an actuall "exe". * * *?

Is their some why I have to compile or package my project into a real .exe?

They failed to go over this in college.

Understanding ActiveX Exes
Is it possible to have an ActiveX exe that can

a. Run like a regular .exe by being double-clicked. This starts up as Sub Main.
b. Run like a regular .exe by having a file [of type] associated with itself double-clicked and passed as a command-line argument. Also Sub Main.
c. Act like an ActiveX server, that when one of its objects is instantiated it runs the code in that class only and does not call Sub Main.

How can this be set up, and which project properties should be chosen?

Does VB6 Have To Be Installed In Order To Run VB6 Exes?

I know there are certain runtime files that are required to run VB6 executables. I was told the following are necessary.

- msvbvm60.dll
- olepro32.dll
- stdole2.tlb
- asycfilt.dll
- oleaut32.dll

Without having VB6 installed on a pc where can I get these necessary runtime files? Can they be downloaded?

Thanks, malaize

Copyright 2005-08, All rights reserved