#1 2009-09-30 17:38

narayan
Senior Member
Registered: 2009-02-08
Posts: 470

Two instances will share same settings, autorun issue

I created two instances of Shutter; One to start a program and the other to close that window later.  Both instances were set to Autorun when Windows starts.

But when I restarted the PC, two identical instances of Shutter started. (setting of one instance was replaced by setting from the another instance).

This is a huge setback.

Last edited by narayan (2009-09-30 17:45)

Offline

#2 2009-10-04 14:39

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,374

Re: Two instances will share same settings, autorun issue

You have several topics covering exactly same issue. You will understand in a minute. Read the following carefully.

Each hard copy of Shutter.exe stores its settings in Shutter.ini in the same folder. The settings are loaded when Shutter launches, and settings are written when Shutter terminates.

Now, if you think about this, you'll understand why you have been having all these problems. wink

So, simply use 2 hard copies of Shutter (in 2 different folders) if you don't want them to share and mess up the settings.

Offline

#3 2009-10-04 15:03

narayan
Senior Member
Registered: 2009-02-08
Posts: 470

Re: Two instances will share same settings, autorun issue

Well, I have never heard of copying any application folder before running it! roll

Obviously Shutter is NOT designed to do multiple tasks concurrently.

The plus side is, if you change the mechanism, it will solve all the issues at one stroke. smile

Offline

#4 2009-10-04 15:17

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,374

Re: Two instances will share same settings, autorun issue

You are confusing different concepts here.

Shutter is working perfectly fine with multiple tasks (multiple instances), and they all share the same settings (so as 99.9% of ALL applications). You are forgetting that you are still working with a single application, but with multiple instances of it.

narayan wrote:

if you change the mechanism, it will solve all the issues at one stroke.

And to do that, you need to create 2 copies of an application, so they can be configured differently.

Offline

#5 2009-10-04 18:14

narayan
Senior Member
Registered: 2009-02-08
Posts: 470

Re: Two instances will share same settings, autorun issue

Probably I was not clear: I am not changing any settings between the instances (except the events and actions). 

All I want is to control one application with Shutter. (Start it at time1 and close it at time2). Further, this arrangement should continue  when I restart Windows.

I think this is just like using Windows scheduler. Just one application should do these jobs.

Offline

#6 2009-11-14 04:05

narayan
Senior Member
Registered: 2009-02-08
Posts: 470

Re: Two instances will share same settings, autorun issue

OK since there is no better solution available, I followed the way suggested.

* I copied the entire Shutter folder twice, and renamed them "Shutter - Start program" and "Shutter - Stop program". (The original folder still exists).

Note that at that point, Shutter already had all its settings saved in the ini file, which also got copied.

* I opened both new folders and started their Shutter exe files. Then I re-entered the start/end settings.

The settings that are relevant here are as follows:
"Autorun at Windows startup/logon" - selected.
"Start events when program starts" -  selected.
"Restart events after actions have been triggered". - Selected.
"Close program after actions have been triggered" - unselected.

"minimize to tray" etc.) are correctly inherited from the original copy of Shutter.

PROBLEMS:
1. When I restart the PC, none of the Shutter copies restarts.
2. When events are triggered, the Shutter program exits.

So this "multiple copies - One copy per task" idea does not seem to work.

Reporting for Windows XP SP-3.

P.S. I tried to add the exe's to the Control Panel> Startup program, but it accepts only one of the programs (it rejects the second request stating "program with same name already exists".)

Last edited by narayan (2009-11-14 04:22)

Offline

#7 2009-11-14 14:46

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,374

Re: Two instances will share same settings, autorun issue

That "P.S." highlighted the real issue here. Shutter, as any other application, creates a Key in the "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" by the name of the application, for example: "Shutter"="C:\Shutter\Shutter.exe". The problem happens when second copy of the application tries to set it-self to autorun, basically rewriting the "Shutter" key.

The simple solution is to use full path to the application as the key name, for example: "C:\Shutter\Shutter.exe"="C:\Shutter\Shutter.exe", allowing multiple copies of Shutter to be added to autorun.

This solution been implemented in the latest dev version: ShutterBeta.zip

Offline

#8 2009-11-14 16:30

narayan
Senior Member
Registered: 2009-02-08
Posts: 470

Re: Two instances will share same settings, autorun issue

Thanks for the prompt response.

I replaced the exe and dll files in my both Shutter folders (start and stop).
Then I started up both exe files. They have retained the sterting+closing settings.
But when I restarted the PC, neither of them could restart on their own.

I have not added them to the Control Panel > Startup, because I want to make use of the internal (General) settings of Shutter itself.

I guess they will also close when the event triggers (I have not checked this yet).

So what should I do next?
I hope there is no need to tweak the registry key values!

Offline

#9 2009-11-14 16:47

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,374

Re: Two instances will share same settings, autorun issue

narayan wrote:

They have retained the starting+closing settings.

Everything except the autorun option. Autorun option is the only one that is not stored in the INI file. Shutter checks whether there is a autorun entry in the registry.

I have tried it again and it works for me. I have created 2 copies of Shutter folder (Shutter1 and Shutter2). They could both set their autorun option independently. They have both started up when I rebooted.

I am getting lost in the issue... Can you check again, possibly with a fresh copy of Shutter Beta?

Offline

#10 2009-11-14 19:19

narayan
Senior Member
Registered: 2009-02-08
Posts: 470

Re: Two instances will share same settings, autorun issue

OK followed the new instructions as follows:

1. Deleted the old folders (all copies).
2. Then created new folders (for start and stop).
3. Placed a copy of Shutter dll+exe in each of these folders.
4. Double-clicked on each exe to run it (One by one).
5. All settings were reset (this is as expected). I set all settings again exactly as before.
6. When I start Shutter for the first time, it goes to systray when I minimize/close the shutter window. The Shutter icon in the systray does NOT disappear when the event is triggered.
That means Shutter behaves exactly as expected for till I restart the PC.

7. When I restarted the PC. Both the Shutter windows popped up again.
    both windows show their own settings correctly.
   This far it is OK, but when I closed the Shutter windows, Shutter does not go to systray.
    (I have selected "minimize when click on close button" option; so it should go to systray).

   In this state, the process explorer shows just two Shutter icons.
   But there is no evidence of a process actually running (CPU percentage, etc.)

8. I repeated the experiment by minimizing the Shutter window.
    Again, Shutter does not go to systray.

******
Additional remarks:
I have not cleaned up the registry entries that may be left behind by the earlier Shutter installations. Neither have I added the two Shutter copies to mu Control panel's Startup menu.

But I expect the Shutter to autorun because its "autorun when window restarts" option
is selected (in both copies of Shutter).

Note that Shutter misbehaves only when I restart the PC. (

Last edited by narayan (2009-11-14 19:24)

Offline

Board footer

Powered by FluxBB