RestartonClose=true

For general issues related to PWB v2.

Moderators: Tyler, Scott, PWB v2 Moderator

jfrasier
Benefactor
Benefactor
Posts: 135
Joined: Sun Jun 27, 2004 9:05 pm

RestartonClose=true

Post by jfrasier »

I have this set in the .ini. I have a shellbar button that essentially presses ALT-F4. That closes PWB, but it doesn't restart.

I am using 2.11, Windows XP and IE 8

Thanks.

Jane

jfrasier
Benefactor
Benefactor
Posts: 135
Joined: Sun Jun 27, 2004 9:05 pm

Re: RestartonClose=true

Post by jfrasier »

I was just taking another look at this and I believe that maybe it did restart, but is just 'invisible'. If I try to start it again from the shortcut nothing seems to happen. In the TaskManager however, is shows pwb.exe as a running process.

:?

Scott
Site Admin
Site Admin
Posts: 2528
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Re: RestartonClose=true

Post by Scott »

Is there a PWB icon on the Taskbar?

If you hit Alt-F4 does PWB close and re-open?

--Scott

jfrasier
Benefactor
Benefactor
Posts: 135
Joined: Sun Jun 27, 2004 9:05 pm

Re: RestartonClose=true

Post by jfrasier »

I am running in kiosk mode so before it closes, no, there is no taskbar. After I close it, there is no PWB icon on the taskbar.

Scott
Site Admin
Site Admin
Posts: 2528
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Re: RestartonClose=true

Post by Scott »

If you hit Alt-F4 on the keyboard does PWB close and re-open?

--Scott

jfrasier
Benefactor
Benefactor
Posts: 135
Joined: Sun Jun 27, 2004 9:05 pm

Re: RestartonClose=true

Post by jfrasier »

No, ALT-F4 doesn't work either.

I copied the whole folder from one that was working in another building to this computer and I still have the same result on this one.

The .ini file is read from a network share. I am thinking that maybe that is the problem except it reads it fine the first time it opens. It just doesn't re-open.

Frustrated.

jfrasier
Benefactor
Benefactor
Posts: 135
Joined: Sun Jun 27, 2004 9:05 pm

Re: RestartonClose=true

Post by jfrasier »

In the .ini it says "RestartOnClose=TRUE". Is ALT-F4 in this case the same as Close?

But that would explain why it works in one building and not another/

jfrasier
Benefactor
Benefactor
Posts: 135
Joined: Sun Jun 27, 2004 9:05 pm

Re: RestartonClose=true

Post by jfrasier »

Could it be a speed issue? The one that doesn't work is a much newer computer and maybe needs a delay in the script. Also the one that works is running IE7 and this one IE8

Scott
Site Admin
Site Admin
Posts: 2528
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Re: RestartonClose=true

Post by Scott »

Alt-F4 is the Windows keyboard shortcut to close an application. When you have RestartOnClose=True, closing PWB with Alt-F4 will re-open it.

The problem you have been describing is with a button on the PWB Shellbar. If the Shellbar button is running an application that kills the PWB process instead of closing PWB normally, the RestartOnClose will not have a chance to run.

This is why using the Alt-F4 test will tess us something.

--Scott

jfrasier
Benefactor
Benefactor
Posts: 135
Joined: Sun Jun 27, 2004 9:05 pm

Re: RestartonClose=true

Post by jfrasier »

OK. I answered my own question. The lines in the script

press Alt-4
Delay (4)

I did have it only delay (2)

jfrasier
Benefactor
Benefactor
Posts: 135
Joined: Sun Jun 27, 2004 9:05 pm

Re: RestartonClose=true

Post by jfrasier »

This is sure frustrating. Now it works sometimes. I have increased the delay to 6

Scott
Site Admin
Site Admin
Posts: 2528
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Re: RestartonClose=true

Post by Scott »

What is this script you are using?

--Scott

jfrasier
Benefactor
Benefactor
Posts: 135
Joined: Sun Jun 27, 2004 9:05 pm

Re: RestartonClose=true

Post by jfrasier »

Created using Winbatch.

;Created by J. Frasier
;6/1/05 for ExpressCats (modified 11/30/2012)
;to close PWB. The .ini has RestartonClose=TRUE
;A shortcut to this will be on the shellbar

;what to do if user terminates batch, allow Windows to exit with no warning
IntControl (12,1,0,0,0)

;sets winbatch icon to hidden
IntControl(1002,0,0,0,0)

;keystrokes to close PWB
SendKey("!{F4}")

Timedelay (6)


This is the code and then Winbatch compiles it to an .exe

Scott
Site Admin
Site Admin
Posts: 2528
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Re: RestartonClose=true

Post by Scott »

If you just need a Shellbar button to close PWB you can use the PWBStop application from the Downloads page.

--Scott

jfrasier
Benefactor
Benefactor
Posts: 135
Joined: Sun Jun 27, 2004 9:05 pm

Re: RestartonClose=true

Post by jfrasier »

I'll try that

Post Reply