Jump to content

How to start another instance of exe program


Recommended Posts

Hello,

I developed an nice tool to manage VNC clients host and launch a VNC viewer to access a remote computer. I have many clients that I setup VNC host on their computers. I carry the VNC application I created, VNC table in CSV file, and the VNC viewer from RealVNC on my memory stick. Now, I do not have to look up connection info and can run from any Windows computer that is on the Internet.

As part of the its program feature growth, I need to be able to launch multiple instances of VNC viewer from my app. There is no problem doing this outside of my program. How do I start another instance of VNC viewer for access to another computer with the VNC host?

Thanks

Dr SherlockAlways a way

Link to comment
Share on other sites

Hi nugame

. . . . run it a second time. . . .

what problem will occur?

p.s. your program looks interesting,

(could you post it?)

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Link to comment
Share on other sites

I run the script attached, select a client then a computer if more that one in the combobox, then connect. it works like a charm. When I select another client and/or computer, nothing happens. This is work in progress by levels of baselines. See attach.

VNCManager.au3

Dr SherlockAlways a way

Link to comment
Share on other sites

I took a look at the script,

only one instance of vnc is started because the script checks whether vnc is already running, and if so rather than to start another, it is used that one that is already running.

as you can see from the commands in this part of the listing:

$state = WinGetState("VNC Viewer", "") ; <-- is vnc already running ?

If ($state = 0) Then ; <-- if not running then start it

Run( "VNCViewer5_Win64bit.exe", "c:\mytest\RAI")

...... else activat the one already running

; Get current state of VNC Viewer to determine if we need to run or restore it
$state = WinGetState("VNC Viewer", "")

; Start Aloha Manager if not exist or activate if min or max
If ($state = 0) Then
Run( "VNCViewer5_Win64bit.exe", "c:\mytest\RAI"); [, flag[, standard_i/o_flag]]] )
WinWait("VNC Viewer","")
Else
; Determine which valid state of VNC Viewer (min, max, or none) then act to get active
If BitAnd($state, 1) or BitAnd($state, 2) or BitAnd($state, 4) Then
WinActivate("VNC Viewer", "")
EndIf
EndIf

bye

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Link to comment
Share on other sites

Thank you for your input and appreciated your help. this will not working. The VNC viewer is used to launch a viewing portal once the connection authentication is made. From then on, the VNC viewer no longer there to activate, only the VNC portal. what I need is to launch another instance of VNC viewer to open another portal to another remote computer and have two or more portals going simultaneously. One can do this manual on the desktop with no issues and limitations. Any ideas? thanks again.

Dr SherlockAlways a way

Link to comment
Share on other sites

Sherlock Holmes solved the mystery. Wayfarer did pointed this out by not the way we saw it. I was testing for VNC running and if not run it then connect. Well, I do not need to do this if I want another instance of VNC viewer for different connection to a remote computer while still connected to the first computer. So solution is not to check for the state of VNC viewer. thanks.

Dr SherlockAlways a way

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...