AutoHotkey Community

It is currently May 26th, 2012, 9:21 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: April 13th, 2005, 9:17 am 
Offline

Joined: February 14th, 2005, 10:54 am
Posts: 447
Location: Texas, Usa
My 2 cents
Would creating a transparent window thats always on top work?

_________________
my lame sig :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 13th, 2005, 11:52 am 
Offline

Joined: February 27th, 2005, 5:51 pm
Posts: 139
Location: Heidelberg, Germany
Hi,

MYYM wrote:
Quote:
If I just use an AHK script asking for password, there is no problem to kill this app with ALT-F4 or using the task manager.


did you try my last post?
you can't close or kill this script without the password. !!
just try it.. and let me know the result?!

MYYM

I tried your script. It is possible to change to other apps and close them :-( and I don't like to have a password hard coded in a script. :-(
So I still think about what I can do...

NiWi.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 26th, 2005, 12:10 am 
Offline

Joined: March 16th, 2005, 10:33 pm
Posts: 969
Location: Frisia
Long time ago since you asked, but I found this:

WinLock.dll

See also this thread with more 8)

Quote:
Visual Basic example:

Private Declare Sub LockKeys Lib "WinLock" (Optional intHWND As Long)
Private Declare Sub UnlockKeys Lib "WinLock" ()
' This example demonstrates you use of
' - LockKeys
' - UnlockKeys
' functions of the WinLock.dll.
Sub WinLockDemo()


' ~~[ Step 1 ]~~
' Lock the system hot keys:
' Win+D ' Show Desktop using Windows key
' Win+E ' Run Explorer
' Win+F+(Ctrl) ' Find:All (and Find: Computer)
' Win+M ' Minimize all windows
' Win+R ' Run program
' Win+F1 ' Windows Help
' Alt+Tab ' Task switching
' Ctrl+Esc ' Start menu
' Win+Tab ' Special task switching mode
' Win+Pause ' Windows system properties
'
' Some Registry keys will be TEMPORARY changed
' to disable the Ctrl+Alt+Del sequence in Windows 2000/XP:
' HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System:
' DWORD:DisableChangePassword = 1
' DWORD:DisableLockWorkstation = 1
' DWORD:DisableTaskMgr = 1
' DWORD:DisableChangePassword = 1
' HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer:
' DWORD:NoBlock = 1
' DWORD:NoChangeStartMenu = 1
' DWORD:NoClose = 1
' DWORD:NoRun = 1
' DWORD:NoSMHelp = 1
LockKeys

' ~~[ Your Main Cycle ]~~
' Implement your MAIN CYCLE for slideshow, screensaver, kiosk or game HERE:
MsgBox "System hot keys and Task Manager are currently LOCKED. Please try out all the known sequences like Alt+Tab, Ctrl+Esc, Windows key etc... and press OK to unlock."

' ~~[ Step 2 ]~~
' Do not forget to unlock the hot keys:
UnlockKeys

End Sub

_________________
Image mirror 1mirror 2mirror 3ahk4.me • PM or Image


Report this post
Top
 Profile  
Reply with quote  
PostPosted: July 22nd, 2005, 9:15 pm 
I think I have found what you are looking for

http://www.e-motional.com/tscreenlock.htm

It is a transparent screensaver that allows you to use the windows password to get in. This link is for the WinNT/2000/Xp version. They have another version for Win98


Report this post
Top
  
Reply with quote  
PostPosted: July 26th, 2005, 8:34 am 
Offline

Joined: February 27th, 2005, 5:51 pm
Posts: 139
Location: Heidelberg, Germany
Hi,

Thank you for reporting this link - but the software is not freeware... :-(

NiWi.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 26th, 2005, 7:36 pm 
Offline

Joined: September 7th, 2004, 9:20 pm
Posts: 275
Location: France
daonlyfreez wrote:
Long time ago since you asked, but I found this:

WinLock.dll



As I'm not able to do it, is it possible that someone post an example on how to use this DLL in AHK with DllCall to lock and unlock the PC ?

Thanks by advance.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 26th, 2005, 7:38 pm 
Offline

Joined: August 23rd, 2004, 10:06 pm
Posts: 276
Location: East Bay, California USA
Here is ascript that will shade the Active Window with out the Tray Icon...
I am still working on a way to lock it so someone cant close the window with out a password.

Code:
#notrayicon
#singleinstance,Force

;***********************************
; Change the "C:\Temp" directory to what ever active window you use everyday
; Or set to blank to enforce the "LastWindowFound"

WinWait, C:\temp\AutoHotkey\Scripts
IfWinNotActive, C:\temp\AutoHotkey\Scripts, ,
WinActivate, C:\temp\AutoHotkey\Scripts
WinSet,Transparent, 10, C:\temp\AutoHotkey\Scripts
winset,AlwaysOnTop,ON

;**********************************
; Loops the Window to keep it on top

loop
{
   ifwinnotactive,C:\temp\AutoHotkey\Scripts
   {
      winactivate,C:\temp\AutoHotkey\Scripts
   }
}
return

_________________
----------------------------
Wingfool you fat! I mean, Wingfat you fool!
Line from Woody Allen's movie "What's Up Tiger Lilly?"
-----------------------------


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2005, 12:15 pm 
@Nemroth: You can use the script here too. It's a normal grey window now, 'uncloseable' and forced always on top, but you can adapt it to become transparent (will ofcourse only work on NT-based systems), or add anything you want, or adapt it (access-screen/kiosk/screensaver).

You can use AHK's hotstring ability for "invisible" password/phrase access (hardcoded into the compiled script) 8)

How to use and control the .dll, I don't know either, but I think AHK can do all you need...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2005, 3:14 pm 
Offline

Joined: September 7th, 2004, 9:20 pm
Posts: 275
Location: France
Thanks daonlyfreez, I will try to make the DllCall for the WinLock DLL (it will be my first one if I succeed...)

I can confirm that the WinLock DLL here and the one here are not the same as the exported functions are not the same. I seen that wih DLL Export Viewer

The How to realize a kind of kiosk-mode? topic can help to make an access screen utility that block the usage of the PC by hitting an hotkey...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 29th, 2005, 12:28 pm 
Offline

Joined: March 16th, 2005, 10:33 pm
Posts: 969
Location: Frisia
How about this?

(WinNT based systems only, mousecontrol and transparency are used)

Not a screensaver (but could be easily adapted to become one), but a 'normal' script/app... (adaptation of my previous script)

You will see the desktop and all running applications (everything), but you will NOT be able to interact with it. The mouse can be moved freely around, but won't do anything...

You can choose to hide the desktop, and/or the taskbar too, or minimize all applications... Moreover you can 'disable' the TaskManager...

Pressing the F1 key, or typing "stop" will stop it (and nothing else should)...

Enable the 'Security Settings' only if everything works as expected, or you might lock yourself out...

USE AT YOUR OWN RISK!

Code:
#persistent
#singleinstance force
#notrayicon
setbatchlines, -1
SetWinDelay, -1

; ********** Variables

Title = Break me!

; changing the transparency to 0 will send all
; keystrokes/mouseclicks thru the window to the
; window behind. For security, set it to atleast 1 (max 255)
setTrans = 1

; Size adaptations for screen dimensions, might need adaptation
sh = %a_screenheight%
;sh -= 24
sw = %a_screenwidth%
;sw -= 5

; ********** SECURITY SETTINGS ON: **********

/*
; Hide the Desktop/Taskbar:
DetectHiddenWindows, on
WinHide, Program Manager
WinHide, ahk_class Shell_TrayWnd
DetectHiddenWindows, off

; Minimize all:
Send, #m

; Disable them Windows Security Screen (Ctrl + Alt + Delete Screen) buttons:
WinSecurityButtons("off")
*/

; ********** Create the Gui
Gui, +alwaysontop -sysmenu -resize +owner
Gui, Show, x0 y0 h%sh% w%sw%, %Title%
WinSet, Transparent, %setTrans%, %Title%
Gui, -Caption
WinActivate, %Title%
Return

; ********** Disable them 'specific' keycombos:

#b::
#l::
#p::
#c::
#v::
#k::
#i::
#a::
#Space::
#u::
^q::
^w::
!F4::
^F4::
#d::
#e::
#f::
#F3::
#^f::
F3::
#m::
#+m::
#r::
#F1::
!TAB::
!+TAB::
LWin::
RWin::
#ESC::
^ESC::
^+ESC::
AppsKey::
#TAB::
#+TAB::
#PAUSE::
!ESC::
#+ESC::
F11::
return

; Catch mouse
LButton::
RButton::
MButton::
WheelDown::
WheelUp::
XButton1::
XButton2::
return

; ********** Disable gui actions
GuiClose:
GuiEscape:
GuiSize:
GuiContextMenu:
GuiDropFiles:
return

; ********** This should be the only way to stop it:
F1:: ; press F1
:*:stop:: ; type "stop"

; ********** SECURITY SETTINGS OFF: **********
/*
; Enable buttons
WinSecurityButtons("")

; Enable Desktop
DetectHiddenWindows, on
WinShow, Program Manager
WinShow, ahk_class Shell_TrayWnd

; Minimize all undo:
Send, #+m
*/
; **********

; Done, so exit...
ExitApp

; ********** Functions - Routines **********

; --- Disable/enable Windows Security Window buttons...
WinSecurityButtons(toggle)
{
   If toggle = off
   {
      SetTo = 1
   }
   else
      SetTo = 0
   ; Edit Registry
   Keys1 = NoBlock,NoRun,NoSMHelp,NoChangeStartMenu,NoClose,NoLogoff
   Loop, PARSE, Keys1,`,
   {
      RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Policies\Explorer, %A_LoopField%, %SetTo%
   }
   Keys2 = DisableTaskMgr,DisableChangePassword,DisableLockWorkstation
   Loop, PARSE, Keys2,`,
   {
      RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Policies\System, %A_LoopField%, %SetTo%
   }
   return
}

_________________
Image mirror 1mirror 2mirror 3ahk4.me • PM or Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 29th, 2005, 2:50 pm 
Offline

Joined: September 7th, 2004, 9:20 pm
Posts: 275
Location: France
Thanks daonlyfreez.

I will study your code and try it.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: September 24th, 2005, 11:19 am 
Offline
User avatar

Joined: December 20th, 2004, 12:19 pm
Posts: 796
Location: LooseChange911.com Ask Questions, Demand Answers █ The WTC bldgs █ shouldn't have fallen █ that fast
I know this is an old thread, but I found it searching for my problem (haven't solved my problem yet tho)...

niwi wrote:
The answer is to see what is on my screen, but if someone tries to access the computer the password has to be entered.

...I believe this does exactly that...

Code:
/*
Bugs...
* 1 keypress gets thru, that press is sent to the active window, if someone can compromise security in one keypress then more power to them...to disable this 1 press, you can create a transparent window over the screen to catch keys or enable BlockInput below, if you enable that, then mouse movement won't turn off the screen saver, any keypress will tho & that press won't go to any window.
*/
/*
CoordMode, Tooltip
   TrayTip, , % A_TimeIdlePhysical
*/
if A_TimeIdlePhysical<319
   Sleep, 1000
/*
else
   TrayTip, , No Sleep
*/
;BlockInput, on            ; use keyboard to remove screen saver
A_TimeIdlePhysical_Last=0
Loop
{
   if (A_TimeIdlePhysical<A_TimeIdlePhysical_Last)
      break
   A_TimeIdlePhysical_Last:=A_TimeIdlePhysical
/*
A_TimeIdle_Last:=A_TimeIdle
Tooltip, % A_TimeIdlePhysical " < " A_TimeIdlePhysical_Last "`n" A_TimeIdle " < " A_TimeIdle_Last ;, 640, 480
*/
Sleep, 10               ; without this it eats 50% CPU!?!
}
;msgbox, Lock Workstation!
DllCall("LockWorkStation")

...everyone else's approach was to disable all input so you can't Ctrl+Alt+Del, mine just locks as soon as A_TimeIdlePhysical has reduced at all.

I know that may not look pretty with all the debug code in it, but if you just delete all the /* */ comments you can clear up what it's really doing...or uncomment the debug code to see status info.

I only tested by really running the script, I didn't compile, make it a .scr & run it that way, but I can't see why it running that way would change what it does.

Hrm...you might even be able to remove the DllCall & check the box in the screen saver dialog "On resume, password protect" or "On resume, show Welcome Screen". That way the check box is listened to...basically all you need is a screen saver that does nothing & then exits...that checkbox in windows should handle the locking...

_________________
AutoHotkey-Hotstring.ahk - Helping the world spell "AutoHotkey" correctly! (btw, it's a lowercase k!)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 6th, 2005, 4:44 pm 
Offline

Joined: October 3rd, 2005, 2:42 am
Posts: 186
A quick skim of this thread shows that nobody else has pointed it out, so:

You can't get a real password protected screensaver running with "true" transparency under any modern version of Windows (NT/2000/XP).

These run screen savers in the "security" desktop - a seperate, protected workspace. Anything running on one desktop can't communicate with anything on another desktop (launch processes, get a screendump, etc). So screensavers can't be truly transparent.

You can launch the screensaver and pass it a screengrab at startup. This would be static, so will clearly be wrong if there are any animated things on the desktop (an analog clock would be the worst, but even the taskbarclock would count).

You can just try (as people have written here) to block all keys like ctrl-alt-del, but however you do that, you'll never have the security of a real screensaver, so that's basically a Really Bad Idea.

I think this is the method that "Transparent screenlock pro" are using, though, particularly since (if I read their blurb right) they offer the ability to *properly* lock thescreen when the user moves away from the computer.

There's an interesting suggestion here, though:
http://www.halfbakery.com/idea/Transpar ... creensaver

Quote:
You could do workarounds, like running a background piece of spyware on your main desktop who is willing to broadcast the desktop's contents to whoever asks (ie. the screensaver).


Apparently it has been done:

Quote:
Clear Screen Saver is on the Win2K resource kit (exoensive) Supplement One CD-ROM in the Apps\clearscreensaver folder.

_________________
Yet another hotkeyer.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 7th, 2005, 4:36 am 
Dewi,

I do not agree with you when you say that you cannot get "a real password protected screensaver running with true transparency under any modern verion of windows"

Transparent Screen Lock Pro http://www.e-motional.com/tscreenlock.htm seems to do exactly that. And to unlock the system the user must enter the same logon password that they use to log on to windows. If they change their password the program knows as you do not have to enter the password anywhere in Transparent Screen Lock Pro's configuration - meaning that the program uses the internal password of windows.

I am now testing a beta version of the program where you select Transparent as one of the screensavers in "Dispaly Properties" If you want the beta version just e-mail them and they send you a link to download the beta - i don't think you need to be a registered user.

Obviously you dont have the same security of a real screensaver because a real screensaver hides your desktop. Here your desktop of completely exposed but a user cannot do anything to the system without entering a password.

I have read the stuff on the halfbakery.com site and none of that makes any sense to me.

Best thing to do is to try Transparent from the site i have above and add your comments about that here.

If somebody has another solution then they should mention it too. I would like to try it out.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 8th, 2005, 6:39 am 
Offline

Joined: October 3rd, 2005, 2:42 am
Posts: 186
Yes. Read the end of my post to find out how they did it - you cannot do this without a "spy" program passing the information to the screensaver.

I'm sure that is possible through AHK, so long as people are aware that they need to do it that way: which is why I pointed it out.

_________________
Yet another hotkeyer.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 10 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group