2017-06-01

UE-V Template Scoother Software - Beyond Compare v4

You can now find this template in my GIThub repository


<?xml version="1.0"?>
<SettingsLocationTemplate xmlns="http://schemas.microsoft.com/UserExperienceVirtualization/2013A/SettingsLocationTemplate">
 <Name>Beyond Compare</Name>
 <ID>Scooter_Software-Beyond_Compare-v4</ID>
 <Version>1</Version>
 <Author>
  <Name>David Djerf</Name>
 </Author>
 <Processes>
  <Process>
   <Filename>BCompare.exe</Filename>
   <ProductVersion>
    <Major Minimum="4" Maximum="4" />
   </ProductVersion>
   <FileVersion>
    <Major Minimum="4" Maximum="4" />
   </FileVersion>
  </Process>
 </Processes>
 <Settings>
  <File>
   <Root>
    <EnvironmentVariable>APPDATA</EnvironmentVariable>
   </Root>
   <Path Recursive="true">Scooter Software\Beyond Compare 4</Path>
  </File>
 </Settings>
</SettingsLocationTemplate>

UE-V Template - Meldmerge.org - Meld

You can now find this template in my GIThub repository


<?xml version="1.0"?>
<SettingsLocationTemplate xmlns="http://schemas.microsoft.com/UserExperienceVirtualization/2013A/SettingsLocationTemplate">
 <Name>Meldmerge.org - Meld</Name>
 <ID>Meldmerge_org-Meld</ID>
 <Version>1</Version>
 <Author>
  <Name>David Djerf</Name>
 </Author>
 <Processes>
  <Process>
   <Filename>Meld.exe</Filename>
  </Process>
 </Processes>
 <Settings>
  <Registry>
   <Path>Software\GSettings\org\gnome\meld</Path>
  </Registry>
 </Settings>
</SettingsLocationTemplate>

UE-V Template - The Eclipse Foundation - Eclipse

You can now find this template in my GIThub repository


<?xml version="1.0"?>
<SettingsLocationTemplate xmlns="http://schemas.microsoft.com/UserExperienceVirtualization/2013A/SettingsLocationTemplate">
 <Name>Eclipse</Name>
 <ID>Eclipse_Foundation-Eclipse</ID>
 <Version>1</Version>
 <Author>
  <Name>David Djerf</Name>
 </Author>
 <Processes>
  <Process>
   <Filename>eclipse.exe</Filename>
  </Process>
 </Processes>
 <Settings>
  <File>
   <Root>
    <EnvironmentVariable>USERPROFILE</EnvironmentVariable>
   </Root>
   <Path Recursive="true">workspace\.metadata</Path>
  </File>
  <File>
   <Root>
    <EnvironmentVariable>USERPROFILE</EnvironmentVariable>
   </Root>
   <Path Recursive="true">.eclipse</Path>
  </File>
 </Settings>
</SettingsLocationTemplate>

UE-V Template - Open Visualization Tool (OVITO)

You can now find this template in my GIThub repository


<?xml version="1.0"?>
<SettingsLocationTemplate xmlns="http://schemas.microsoft.com/UserExperienceVirtualization/2013A/SettingsLocationTemplate">
 <Name>OVITO - Open Visualization Tool</Name>
 <ID>ovito_org-ovito</ID>
 <Version>1</Version>
 <Author>
  <Name>David Djerf</Name>
 </Author>
 <Processes>
  <Process>
   <Filename>ovito.exe</Filename>
  </Process>
 </Processes>
 <Settings>
  <Registry>
   <Path Recursive="true">SOFTWARE\Ovito</Path>
  </Registry>
 </Settings>
</SettingsLocationTemplate>

UE-V Template - CSDiff

You can now find this template in my GIThub repository


<?xml version="1.0"?>
<SettingsLocationTemplate xmlns="http://schemas.microsoft.com/UserExperienceVirtualization/2013A/SettingsLocationTemplate">
 <Name>ComponentSoftware - CSDiff</Name>
 <ID>ComponentSoftware-CSDiff</ID>
 <Version>1</Version>
 <Author>
  <Name>David Djerf</Name>
 </Author>
 <Processes>
  <Process>
   <Filename>CSDiff.exe</Filename>
  </Process>
 </Processes>
 <Settings>
  <Registry>
   <Path Recursive="true">Software\ComponentSoftware</Path>
   <Exclude>
    <Path>CSDiffPath</Path>
   </Exclude>
  </Registry>
 </Settings>
</SettingsLocationTemplate>

Send escape to Powerpoint if idle in presentation mode for too long

Problem to solve

Students set powerpoint to presentation mode when they go to lunch etc leaving the computer unlocked and the screen saver wont start (I don't know why, because we allow them to lock the screen for 75 minutes before they get logged off.)

Not only is this a violation of the University computer agreement, they also open for others to use their account to browse the Internet or to copy/delete the files etc. In short, we need to fix this.

What we need to do is to check if the computer is idle for real (not the same as the screen saver looks for) and then let the powerpoint presentation run for 10 minutes at idle before we send escape to exit presentation mode. If they run the presentation for real, they will most likely send new key/mouse presses when they change slide and idletime resets.

To begin with we tried to use a powershell script made by my collegue Lillian.
We tried at least 5 different ways to run the script as a scheduled task, but it would never press escape in powerpoint. (if you make this work please let me know!)
The scheduled job used cscript to run a vbs-script that runs powershell that runs the powershell script. VBS script is used to make the powershell window invisible.
Then I made a very simple "send escape" EXE-compiled AutoIt script as scheduled task and it worked, next step was to convert the powershell code into AutoIt.

The script

If you want another allowed idle time, hust change the number "10" on the line including this:($iIdleTime/1000/60 > 10)

==== Script begins ====

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.14.2
 Author:         Lilian Zachrisson

 Script Function:
Closes PowerPoint presenteation if idle time 10 min or above.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here
#include <MsgBoxConstants.au3>
#include <Timers.au3>

Local $iIdleTime = _Timer_GetIdleTime()

If ProcessExists("POWERPNT.EXE") And ($iIdleTime/1000/60 > 10) Then ; Check if the Powerpoint process is running.
$aWindows = WinList("[REGEXPTITLE:(?i)(PowerPoint Slide show.*)]")
For $i=1 To $aWindows[0][0]
; Close the Powerpoint window using the handle returned by WinWait.
WinClose($aWindows[$i][1])
MsgBox($MB_SYSTEMMODAL, "", "Powerpoint presentation was closed do to inactivity")
Next
EndIf

==== Script ends begins ====

How it runs

The script is compiled into an EXE-file with the Aut2exe.exe tool and is copied to the local computers by a GPO. (in the Computer part of GPO)
The same GPO create a scheduled task that runs every 5 minutes as the logged on user (in the USER part of GPO).

Problems encountered

Heads up! There is a bug(?) in the task scheduler that make repeating jobs halt if you run them manually (like when you spend the entire day testing stuff).
The solution for me was to disable the "allow task to run on demand" option and use two triggers. One that is on a time schedule and repeating every 5 minutes. The other is triggered on user logon and repeats every 5 minutes. Maybe Ill try to remove one of them later on (I'll update my text then).