Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: How to prevent multiple instances of IDE


This question is answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 5 - Last Post: Jun 21, 2016 1:05 PM Last Post By: Robert Kondner
Robert Kondner

Posts: 59
Registered: 11/15/01
How to prevent multiple instances of IDE  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 18, 2016 9:56 AM
Hi,

Running XE7 and soon XE10 on a Windows 10 64bit system. Everything works fine.

On occasion I might accidently open two instances of the IDE and the same project in each. Not Good.

Is there anyway to prevent Windows from opening a second instance of the IDE?

Thanks,
Bob K.
Quentin Correll


Posts: 2,412
Registered: 12/1/99
Re: How to prevent multiple instances of IDE  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 18, 2016 1:13 PM   in response to: Robert Kondner in response to: Robert Kondner
Robert,

| Is there anyway to prevent Windows from opening a second instance of
| the IDE?

Use a BAT file to open RAD Studio, checking in the BAT to see if it's
already open.

--

Q -- XanaNews 1.19.1.372 - 2016-06-18 13:11:48
Robert Kondner

Posts: 59
Registered: 11/15/01
Re: How to prevent multiple instances of IDE  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 20, 2016 5:17 AM   in response to: Quentin Correll in response to: Quentin Correll
Quentin Correll wrote:
Robert,

| Is there anyway to prevent Windows from opening a second instance of
| the IDE?

Use a BAT file to open RAD Studio, checking in the BAT to see if it's
already open.

--

Q -- XanaNews 1.19.1.372 - 2016-06-18 13:11:48

Thanks, I have some RunOnce code in my Delphi too kit, can use that.

How would someone do that from a batch file? Test for instance of running app?

Thanks,
Bob K.
david hoke

Posts: 616
Registered: 2/9/07
Re: How to prevent multiple instances of IDE  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 20, 2016 6:29 AM   in response to: Robert Kondner in response to: Robert Kondner
Robert Kondner wrote:

Quentin Correll wrote:
Robert,

Is there anyway to prevent Windows from opening a second
instance of the IDE?

Use a BAT file to open RAD Studio, checking in the BAT to see if
it's already open.

--

Q -- XanaNews 1.19.1.372 - 2016-06-18 13:11:48

Thanks, I have some RunOnce code in my Delphi too kit, can use that.

How would someone do that from a batch file? Test for instance of
running app?

Thanks,
Bob K.

Looks like something similar to following could work:
rem tasklist | findstr %1
rem echo %errorlevel%
rem goto done
 
 tasklist | findstr bds
rem tasklist | findstr tasklist
if errorlevel 1 goto nobds
goto noerror
 
:nobds
rem echo "errorlevel"
echo %errorlevel%
echo "bds not running"
goto done
 
:noerror
echo "bds RUNNING"
goto done
 
:done
Quentin Correll


Posts: 2,412
Registered: 12/1/99
Re: How to prevent multiple instances of IDE
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 21, 2016 12:42 PM   in response to: Robert Kondner in response to: Robert Kondner
Robert,

| How would someone do that from a batch file? Test for instance of
| running app?

Yes.

--

Q -- XanaNews 1.19.1.372 - 2016-06-21 12:42:29
Robert Kondner

Posts: 59
Registered: 11/15/01
Re: How to prevent multiple instances of IDE  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 21, 2016 1:05 PM   in response to: Quentin Correll in response to: Quentin Correll
Quentin Correll wrote:
Robert,

| How would someone do that from a batch file? Test for instance of
| running app?

Yes.

--

Q -- XanaNews 1.19.1.372 - 2016-06-21 12:42:29

Bit Time Thank You

I should try to learn some of the various CMD line utilities but I get so tired of learning new stuff. Thanks for letting an old dog learn the easy way.

Bob K.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02