PWB will not log user off (and also a registry question).

For general issues related to PWB v2.

Moderators: Tyler, Scott, PWB v2 Moderator

Post Reply
shane
Observer
Observer
Posts: 5
Joined: Mon Jul 16, 2007 9:45 am

PWB will not log user off (and also a registry question).

Post by shane »

I spent a good portion of Friday reading through various 'searches' in regards to having PWB log a user out after a set amount inactivity.

I'm still failing and I'm hoping it's just something real simple that I'm missing.

In the [Inactivity] section of my PWB.INI file I have:

InactivityTimer=True
InactivitySeconds=30 (this is just my test time, the real time will be at 300)

When the time expires my Inactivity.txt fires off like expected, but nothing happens. My account isn't logged off. :) I'm sort of stumped.

Here are my variables:

1 - these are public machines in our five libraries across campus (yes we are regestered PWB users, I'm just picking up this project from a previous employee)

2 - Staff & Students log in via traditional domain/LDAP info, so no worries there. It's not really a factor with PWB.

3 - We get visiting 'patrons' that want to view our digital libraries. For these, I simply have a local account built that fires off the PWB. (This was done utilize the setPWB.exe app. Everything works fine, but the user account isn't automatically logged out after 'X' amount of inactivity.

Bonus side question for multipoints :) Does PWB, manipulate registry settings?

Something I noticed. For our normal domain/ldap users, I utilize an application called ActiveExit XP. This is a third party app that logs users off after a set amount of inactivity time. (It actually does a lot more than that.)

It is actually fired off from the registry when a user logs into a machine, from here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

Works like a charm for everything.

Here's something I noticed. If I utilize the stand alone account that I have set up for PWB, but without the PWB shell set, then the log out application works fine. I can see it in the registry key above.

Now, when I enable the PWB shell for that stand alone account the registry key is erased or ignored, and my ActiveExit XP third party app no longer fires off after my set time.

So, is there a way to tell PWB not to manipulate my registry in this sense?

Sorry, about the overwhelming words :)

Thanks!

~shane

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

Post by Scott »

Did you set the Inactivity Action to Logoff?

[Inactivity]
...
InactivityAction=Logoff
...

From the PWBv2.rtf file:
Action to take when idle time is reached.

Home = browser to home page.
Exit = Browser exits.
Logoff = user is logged off computer.
Warn = The dialog was just a warning, PWB will continue
Restart = Restarts PWB.
Reboot = Computer will be rebooted.
Execute = Executes file specified in [Files] InactivityScript.
Executehome = Executes file and browses home.
Lock = Locks Workstation. (Windows NT/2K/XP only)
Lockhome = Locks Workstation, and browses home.

Also make sure the logged on user can log off. It is possible to set security tight enough to prevent the user from logging off which will prevent PWB from logging the user off.


If you run PWB as the Windows shell, the "Run" key will not start. It is Explorer as the Windows shell that starts the applications in the "Run" key.

Instead of running PWB as the Windows shell, try using HideGUI.
http://teamsoftwaresolutions.com/phpBB2 ... .php?t=536

--Scott

shane
Observer
Observer
Posts: 5
Joined: Mon Jul 16, 2007 9:45 am

Post by shane »

Hey Scott.

Yes, the Inactivity Action was is/was set to Logoff (in fact I've tried several other of the variables too for testing and nothing triggers)

I just had a thought, I forgot an important variable (which shouldn't matter, but who knows) I'm working on this in a virtual environment (VMWare). I should hope that doesn't affect things, but who knows.

And yes, the user can log off under normal circumstances.

I'm also going to investigate the HideGUI you mentioned.

Thanks for the pointers so far.

~shane

shane
Observer
Observer
Posts: 5
Joined: Mon Jul 16, 2007 9:45 am

Post by shane »

Another clue.

I was utilizing one of the existing machines, where this supposedly works (and it doesn't) and I found:

1 - The inactivity.txt was not being called up unless I actually put the full path i.e.: InactivityMessageFile=C:\Program Files\TeamSoftware Solutions\Public Web Browser v2\Inactivity.txt

InactivityMessageFile=Inactivity.txt doesn't work (I assumed the .ini would look for the file in the root directory it was in.

2 - Once I made the full path on one of these 'supposedly working' machines, I ran into the same thing. The countdown would expire, the Inactivity.txt would fire and then nothing would happen other than the Inactivity.txt window going away, but I was able to get an error, once I haven't gotten on my VMWare build:

Error/message I got: "AdjustTokenPrivileges enable failed"

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

Post by Scott »

1. Yes. If you are using PWB as the Windows shell you should use full paths for all the files. When PWB is run as the shell the Start In folder is random and may cause PWB not to be able to find the files.

2. PWB is trying to adjust the privilages to log off. It may be VMWare does not support this Windows API. I can modify PWB to not adjust the privilages and just try to log off.

You could also set the inactivity action to Exit and use the PWB exit script to start the other logoff application.

--Scott

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

Post by Scott »

Here is PWB v2.10.2 that allows for disabling the Adjust Token Privileges.

http://www.teamsoftwaresolutions.com/beta/PWBv2102.zip

You need to be using PWB v2.10.x. Copy the new EXE over the old EXE and add the following to your INI file.

[Security]
...
SimpleShutdown=True
...

--Scott

shane
Observer
Observer
Posts: 5
Joined: Mon Jul 16, 2007 9:45 am

Post by shane »

Okay, I finally got it working. I went through the PWB.INI file pretty much line by line, turning things off/on, and then testing each change looking for the culprit.

I found it.

[Browser]
DisableExit=True

Whomever originally installed our PWB had this set so in the .ini file. I've changed it to:

[Browser]
DisableExit=False

And now, after my desired inactivity time the appropriate inactivity measure will fire off.

Just thought I'd post that for any future references/searches. And my PWB.INI file just incase someone is curious:

Code: Select all

[AutoRegister]
RegisterKey=
RegisterPassword=
RegisterDaysLeft=30
RegisterSeconds=15
RegisterShowWindow=False
UseWindowsRegistry=False
RegisterDelayClose=False

[Browser]
RegisteredTo=xxxxxxx
RegistrationNumber=xxxxxxx
IniFileVersion=2.10
Title=CLS Public Access Workstation
KioskMode=True
DesktopMode=False
HomePage=http://xxxxxxx.xxxxxxx.edu
CommandLineHomePage=False
SearchPage=http://www.google.com
WebMailPage=http://www.gmail.com
AddressBarText=Address:
DefaultFontSize=2
DefaultSendLink=True
StartMaximized=True
AlwaysOnTop=False
WindowHeight=
WindowWidth=
WindowTop=
WindowLeft=
ShowMenuBar=True
ShowToolBar=True
ShowShellBar=True
ShowAddressBar=False
ShowAnimation=True
ShowStatusBar=True
ShowTitleBar=True
ShowBackButtonMenu=True
ShowInactivityTimer=True
ShowActivityTimer=True
ShowStatusBarTime=True
ShowURLInBrowserCaption=True
DisableMinimizeButton=True
DisableMaximizeButton=True
DisableCloseButton=True
DisableMoveWindow=True
DisableResizeWindow=True
DisableNewWindow=False
DisableINIVersionCheck=False
DisableExit=False
ConfirmClose=False
UseIEFavorites=False
ShowGoButton=False
GoButtonText=Go
AlwaysOnBottom=True
DisableIESubClass=False
ShowWindowRelation=False
MainWindowIndicator=(Main)
ShowKioskBar=False
F1HelpPageURL=
ShowSplashScreen=False
DisableAutoComplete=False
ShellExecuteScripts=False
OpenLinksInNewWindow=False
DisableCtrlEnter=False
SaveWindowPosition=True
MinimizeMemoryUsage=False
StartTimersOnMouseKeyboard=False
AddStationToUserAgent=False
EnableAdvancedClose=False
UpdateWindowOnTime=False
RedrawWindowSeconds=
ConfigRegLocation=
DisableScrollBars=False
MapContextPrintToButton=False
PreventHTMLClosingMainWindow=False
AddressBarReadOnly=False

[SecondWindow]
AlwaysOnTop=False
LimitCount=
DisableMinimizeButton=False
DisableMaximizeButton=False
DisableMoveWindow=False
DisableResizeWindow=False
DisableTitleBar=False
WindowHeight=
WindowWidth=
WindowTop=
WindowLeft=
NewPageAsHome=False
OpenInParentWindow=False
DisableUnrequested=False
StartOnDesktopMode=False
OpenDesktopModeLink=True
ShowTimers=False
ShellBarURLNewWindow=False
DisableCloseButton=False
ShowShellBar=True
StartMaximized=False
CloseChildrenOnClose=False
SecondWindowIndicator=(Secondary)
OpenInNewProcess=False
ShowAddressBar=True
ShowGoButton=True
ShowKioskBar=False
ShowToolBar=True
ShowMenuBar=True
ShowStatusBar=True
DisableShiftClick=False
OpenInFrame=

[ToolBars]
MenuBarGripper=False
ToolBarBreak=True
ToolBarGripper=False
ToolBarChevron=False
ShellBarBreak=False
ShellBarGripper=False
ShellBarChevron=False
AddressBarBreak=True
AddressBarGripper=False
MenuBarWidth=
ToolBarWidth=
ShellBarWidth=
AddressBarWidth=
GoButtonGripper=True
GoButtonBreak=False
AlignBottom=False
KioskBarScrollBy=40
AutoSizeButtons=False
ButtonTextRight=False
ToolBarIconHeight=
ToolBarIconWidth=
ShellButtonIconWidth=
ShellButtonIconHeight=
KioskBarButtonColor=
KioskBarBackGroundColor=

[Printer]
ShowPrintButtonDialog=False
ForcePrintPreview=False
UseLimitPrintJobs=False
LimitPrintJobs=0
PrintJobLimitTitle=Print Limit
PrintJobLimitMessageFile=C:\Program Files\TeamSoftware Solutions\Public Web Browser v2\PrintLimit.txt
ShowPrintingDialog=False
PrintingTitle=Page Printing
PrintingMessageFile=C:\Program Files\TeamSoftware Solutions\Public Web Browser v2\Printing.txt
CheckPrintAccess=False
PrintDialogShowCancel=False
ShowPrintMenuDialog=False
PrintTemplateFile=
ShowPrintIDDialog=False
PrintIDDialogTitle=Print Identification
PrintIDDialogHeight=
PrintIDDialogWidth=
PrintIDDialogFile=printID.htm

[Dialogs]
DialogSeconds=15
PolicyTitle=Policy
AccessTitle=Warning: Denied
ConfirmCloseDefaultNo=True
ConfirmCloseTitle=Confirm Close
PolicyHeight=
PolicyWidth=
ConfirmCloseSoundFile=
AccessDeniedSoundFile=
AlwaysOnTop=True
SecondInstanceTitle=Second Instance
IncorrectPasswordMessage=Incorrect password entered?!
AccessURLRedirect=
PolicyShowDecline=True
PolicyShowClock=True
MessageHeight=
MessageWidth=
OkButtonText=Ok
CancelButtonText=Cancel
DeclineButtonText=Decline
AcceptButtonText=Accept
YesButtonText=Yes
NoButtonText=No
ShowPopupMessage=False
PopupOnMessageTitle=Pop-ups are on
PopupOffMessageTitle=Pop-ups are off
UseHtmlDialogs=False

[Files]
WorkingAnimation=
PolicyFile=C:\Program Files\TeamSoftware Solutions\Public Web Browser v2\Policy.txt
HistoryFile=C:\Program Files\TeamSoftware Solutions\Public Web Browser v2\History.txt
CheckURLFile=C:\Program Files\TeamSoftware Solutions\Public Web Browser v2\URL.txt
CheckIPFile=C:\Program Files\TeamSoftware Solutions\Public Web Browser v2\IP.txt
PopupAdFile=C:\Program Files\TeamSoftware Solutions\Public Web Browser v2\Popup.txt
AccessMessageFile=C:\Program Files\TeamSoftware Solutions\Public Web Browser v2\Access.txt
ConfirmCloseMessageFile=
SaveAsErrorMessageFile=
FavoritesFolder=Favorites
ShellBarFolder=C:\Program Files\TeamSoftware Solutions\Public Web Browser v2\ShellBar
StartupScript=
ShutdownScript=
PolicyDeclineScript=
DesktopFile=
SendToAppLink=
SendToAppFile=
CheckPrintFile=
PopupOnButtonFile=
PopupOffButtonFile=
PasswordFile=
NewWindowProcessINI=
InactivityScript=
CheckPostDataFile=
CheckACFile=
ActivityScript=
TimeCheckScriptDay=
TimeCheckScriptNight=
ToolBarIconFolder=

[WebFiles]
EnableWebFiles=False
CheckURLFile=
CheckIPFile=
CheckPrintFile=
PopupAdFile=

[Directories]
SaveAsDirectory=
SaveAsErrorTitle=Floppy required
DownloadDirectory=

[RestrictedSave]
EnableRestrictedSave=False
RestrictedSaveApp=

[Security]
StationEnvironmentVariable=COMPUTERNAME
UseUniqueHistoryFiles=False
WriteHistoryFile=False
TrackURL=False
CheckURLAccess=False
CheckIPAccess=False
ClosePopupAds=False
ShowAccessDialog=True
LogAccess=False
ClearCacheOnHome=False
ClearCacheOnClose=False
DisableAddressDropDown=False
DisableContextMenu=False
UseCustomContextMenu=True
ShowPolicyDialog=False
OnlyAccessHTTP=False
DisableSecondInstance=False
RestartOnClose=False
ShowPasswordDialog=False
PasswordTitle=Public Web Browser
Password=password
CheckInitialURL=False
DisableFileDownload=False
AllowSingleLinkLevel=False
AllowBrowseOnDeny=False
LogoffOnExit=False
ShowFilterStatus=False
FilterOnText=<Filter>
FilterOffText=<Filter>
ShowProxyStatus=False
ProxyOnText=<Proxy>
ProxyOffText=<Proxy>
ShowDenyDialogOncePerSession=False
OnlyAccessInternet=False
DebugAccessString=False
AllowLinkLevelDepth=0
CheckPostDataAccess=False
DisableFileUploads=False
TrackLogon=False
CacheFilterFiles=False
CheckACAccess=False
SecondInstanceNavigateCurrent=False
RebootOnExit=False
SimpleShutdown=True

[Overrides]
ExitBrowser=tixe
Logoff=ffogol
Shutdown=nwodtuhs
ResetActvityTime=resettime
ResetPrintLimit=printlimit
RestrictedSave=evas
ReReadINIFile=
OpenSysedit=
OpenRegedit=
OpenExplorer=
DisableProxy=
DisableFilters=
ShowAddressBar=
OverrideURLKeyword=

[HTMLError]
EnableRedirect=False
DebugErrorNumber=False

[Java]
EnableExternalJava=False
JavaExit=
JavaActivity=
JavaRegister=
JavaHideToolbar=
JavaExecute=
JavaReadINIFile=
JavaPrint=
JavaHideAddressBar=
JavaPrintFrame=
JavaFillElement=
JavaOverrides=

[ScreenSaver]
EnableScreenSaver=False
ScreenSaverSeconds=1200
EnablePolicyScreenSaver=False
PolicyScreenSaverSeconds=10
DisableScreenSaverOnPolicyClose=False
DisableScreenSaverOnClose=False
WindowsScreenSaverExe=
WindowsScreenSaverMinutes=0

[Inactivity]
InactivityTimer=True
InactivitySeconds=300
InactivityMessageTitle=Warning
InactivityMessageFile=C:\Program Files\TeamSoftware Solutions\Public Web Browser v2\Inactivity.txt
InactivityAction=Logoff
InactivitySoundFile=
InactivityStartOnOpen=True
InactivityShowDialog=True
ResetOnMouseMove=True
ResetOnMouseButton=True
ResetOnKeyboard=True

[Activity]
ActivityTimer=False
ActivitySeconds=1200
ActivityMessageTitle=Warning
ActivityMessageFile=Activity.txt
ActivityWarnAt=120
ActivityWarnTitle=Warning
ActivityWarnMessageFile=ActivityWarn.txt
ActivityAction=Exit
ActivitySoundFile=
ActivityStartOnOpen=False
ActivityShowInTitleBar=True
ActivitySecondWarnAt=5
ActivitySecondWarnMessageFile=ActivityWarn.txt
DisableDialogTimer=False

[TimeCheck]
EnableTimeCheck=False
TimeToActionDay=10:14:00
TimeToActionNight=
TimeToWarnSeconds=300
MessageTitleDay=Day Action
MessageFileDay=Access.txt
MessageTitleNight=
MessageFileDNight=
MessageTitleWarnDay=Day Warning
MessageFileWarnDay=Access.txt
MessageTitleWarnNight=
MessageFileWarnNight=
ActionDay=Exit
ActionNight=

[Proxy]
UseCustom=True
ProxyEnable=True
ProxyServer=xxxxxxxxx.xxxxxxx.edu:3128
ProxyOverride=
AutoConfigURL=

[PageSetup]
UseCustom=False
Footer=&u&b&d
Header=&w&bPage &p of &P
MarginBottom=0.75000
MarginLeft=0.75000
MarginRight=0.75000
MarginTop=0.75000
Duplex=1
Orientation=1

[Buttons]
Back=True
Forward=True
Separator1=False
Stop=True
Refresh=True
Home=True
Separator2=True
Search=False
Favorites=False
Print=False
PrintPreview=False
Separator3=True
Send=False
WebMail=False
Separator4=False
About=True
Policy=False
Separator5=True
New=False
Save=False
Separator6=False
Cut=False
Copy=False
Paste=False
Find=False
TextSize=True
Encoding=True
Popup=False
Shell=False

[KioskButtons]
Back=True
Separator1=True
Forward=True
Separator2=True
Stop=True
Separator3=True
Refresh=True
Separator4=True
Home=True
Separator5=True
Print=True
Separator6=True
ScrollUp=True
Separator7=True
ScrollDown=True
Separator8=True
Close=True

[MenuItems]
FileMenu=True
FileNew=False
FileOpen=False
FileSaveAs=False
FileSeparator1=False
FilePageSetup=False
FilePrintPreview=False
FilePrint=False
FileSeparator2=False
FileSend=False
FileSendFile=False
FileSendLink=False
FileSeparator3=False
FileProperties=False
FileExit=False
EditMenu=True
EditCut=False
EditCopy=False
EditPaste=False
EditSeparator1=False
EditSelectAll=False
EditSeparator2=False
EditFind=True
ViewMenu=True
ViewSeparator1=False
ViewGoto=False
ViewGotoBack=True
ViewGotoForward=True
ViewGotoHome=True
ViewGotoSearch=False
ViewStop=True
ViewRefresh=True
ViewTextSize=True
ViewTextSizeLargest=True
ViewTextSizeLarge=True
ViewTextSizeMedium=True
ViewTextSizeSmall=True
ViewTextSizeSmallest=True
ViewSeparator2=True
ViewSource=False
ShellMenu=False
FavoritesMenu=False
FavoritesAdd=True
FavoritesOrganize=True
FavoritesSeparator=True
HelpMenu=True
HelpPolicy=True
HelpAbout=True

[ContextMenu]
OpenLink=True
OpenLinkNew=True
SaveTarget=True
PrintTarget=False
Separator1=True
ShowPicture=True
SavePicture=True
SetWallPaper=True
SetDeskTopItem=False
Separator2=True
Cut=True
Copy=True
CopyShortcut=True
Paste=True
Separator3=True
Encoding=True
Separator4=True
Print=True
Refresh=True
Separator5=True
Properties=True

[URLKeys]
EnableURLKeys=False
EnableURLFKeys=False

[Addons]


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

Post by Scott »

Thank you for pointing that out.

I will check into it, and change PWB the next revision to have it override the disable exit before logging off to avoid any confusion going forward.

--Scott

Post Reply