Jump to content

Help! Compiled script crossing sessions on term server


Zen8Master
 Share

Recommended Posts

I am running a script that checks for mouse movement on a kiosk pc that auto logs into a windows 2003 terminal server

it is for a timout for Internet explorer for user info

The problem is that it kills IE sessions on all 17 kiosks when 1 times out

Why does it not stay to its own session?

the exe is in the all users profile

thanks

script follows:

#NoTrayIcon

Run("C:\Program Files\Internet Explorer\iexplore.exe http://hr-info/kiosk")

Do

$pos = MouseGetPos()

$1 = $pos[0] & $pos[1]

Sleep(300000)

$pos1 = MouseGetPos()

$2 = $pos1[0] & $pos1[1]

Until $1 = $2

Sleep(300)

Run("C:\Program Files\Internet Explorer\iexplore.exe hr-info/logout.cfm")

sleep(1000)

Do

$PID = ProcessExists("iexplore.exe")

If $PID Then ProcessClose($PID)

Until $PID = 0

Sleep(1000)

Exit

Link to comment
Share on other sites

I and Microsoft can not figure out the crossing over problem but a little study and a rewrite got it to work as needed

New Script:

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

AutoIt Version: 3.2.2.0

Author: Rob Sacco

Date: 09/09/2007

Script Function: Log you into local web site http://HR-info , looks at mouse movement in 1 minute intervals and closes IE process that was started

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

; Script Start

#NoTrayIcon

MsgBox(4096, "Please Read", "For Security Reasons HR Info will automatically close after 1 minute of inactivity", 10)

$hrkiosk = Run("C:\Program Files\Internet Explorer\iexplore.exe http://hr-info") & @ComputerName

;MsgBox (4096,"PID Name is",$hrkiosk,999)

Do

$pos = MouseGetPos()

$1 = $pos[0] & $pos[1]

Sleep(60000)

$pos1 = MouseGetPos()

$2 = $pos1[0] & $pos1[1]

Until $1 = $2

Sleep(1000)

Do

$PID1 = ProcessExists($hrkiosk)

If $PID1 Then ProcessClose($PID1)

Until $PID1 = 0

$logout = Run("C:\Program Files\Internet Explorer\iexplore.exe hr-info/logout.cfm", "", @SW_HIDE, 2)

Sleep(1000)

$PID2 = ProcessExists($logout)

If $PID2 Then ProcessClose($logout)

Sleep(1000)

Exit

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...