Recent

Author Topic: UI application to run over Windows logon screen  (Read 9655 times)

fatmonk

  • Sr. Member
  • ****
  • Posts: 252
UI application to run over Windows logon screen
« on: August 25, 2016, 11:41:38 pm »
I know this is going to raise loads of security concerns, but I'm going to ask anyway as I need this functionality...

I need to run a small UI over the windows logon screen. In terms of UI interaction it will have just three buttons and will also programmatically create mouse clicks and display an underlay image under the mouse pointer.

Thanks to some great help in other threads on this forum I have everything working in my main application which just runs as a normal GUI application.

However I need to create a cutdown version of the application that will run on the logon screen and privide a very limited subset of the functionality (as described above).

I've found a couple of threads on StackExchange on the topic as follows:

http://stackoverflow.com/questions/15590308/windows-7-welcome-screen-translating-c-sharp-to-pascal and
http://stackoverflow.com/questions/3070152/running-a-process-at-the-windows-7-welcome-screen

but I can't even figure out if these are really talking about what I'm trying to do - they talk about non-ui and non-interactive applications.

Can anyone advise how I can achieve this?

-FM

mig-31

  • Sr. Member
  • ****
  • Posts: 305
Re: UI application to run over Windows logon screen
« Reply #1 on: August 26, 2016, 11:58:09 am »
If I understand you correctly, you don't what to logon user to window manager in Linux/Unix term.

There is easy under Linux, where you can run any X-Window application, after system boot up without login in to KDE/GNOME/XFCE desktop, and it still need to create user account with some kind of permittion.

Under Windows, I think the simplest way is a create a user with a limited permittion a set up autologin, setup Windows destktop to don't lunch panel (explorer) and forbid this user to run explorer, add your app to startup. I think WinCE on embeded device is configured like this: autologin user, don't lunch panel (explorer) and etc.
Lazarus 2.2.6 - OpenSuse Leap 15.4, Mageia 8, CentOS 7

fatmonk

  • Sr. Member
  • ****
  • Posts: 252
Re: UI application to run over Windows logon screen
« Reply #2 on: August 26, 2016, 12:09:54 pm »
No, this is not a replacement for anything.

The application and UI should be displayed on the Windows logon screen as the application helps users with physical disabilities to interact with the login screen to enter their login credentials. (note, it does _not_ enter their details for them or anything like that. It essentially assists with mouse use)

-FM

mig-31

  • Sr. Member
  • ****
  • Posts: 305
Re: UI application to run over Windows logon screen
« Reply #3 on: August 26, 2016, 12:39:27 pm »
Your way is to switch Linux and create your own KDM/GDM/XDM login manager.
Lazarus 2.2.6 - OpenSuse Leap 15.4, Mageia 8, CentOS 7

balazsszekely

  • Guest
Re: UI application to run over Windows logon screen
« Reply #4 on: August 26, 2016, 01:10:03 pm »
Quote
@mig-31
Your way is to switch Linux and create your own KDM/GDM/XDM login manager.
The thread title clearly says: "UI application to run over Windows logon screen"
Why you are keep insisting on Linux?  :D

fatmonk

  • Sr. Member
  • ****
  • Posts: 252
Re: UI application to run over Windows logon screen
« Reply #5 on: August 26, 2016, 01:38:38 pm »
@mig-31

No it isn't.

Personally I AM a Linux fan and user, and this application will hopefully eventually be cross platform but initially it is for windows.

I cannot control what OS the potential users use and right now the vast vast majority use Windows.

Developing the application for Linux, therefore, would deny almost all of my potential users - including the user I am developing the application with and for!

Notice also that I posted this question in the Windows forum... Trolling about switching to Linux for a primary Windows targeted project is a waste of both your time and mine.

When I come to work on the Linux port I will probably be asking a similar question in the Linux forum, but until then please keep on topic.

I know that what I am asking IS possible as I have seen other applications that do what I want. I am hoping that it can be achieved with Lazarus and that someone here can help me figure out how.

-FM

Thaddy

  • Hero Member
  • *****
  • Posts: 14214
  • Probably until I exterminate Putin.
Re: UI application to run over Windows logon screen
« Reply #6 on: August 26, 2016, 01:43:47 pm »
No, this is not a replacement for anything.

The application and UI should be displayed on the Windows logon screen as the application helps users with physical disabilities to interact with the login screen to enter their login credentials. (note, it does _not_ enter their details for them or anything like that. It essentially assists with mouse use)

-FM

There's a complete API for that for Windows (see msdn), e.g.: the onscreen keyboard uses that API, but it depends on the input device the users are using: This is driver level, not userspace.
So if the input device is meant for the virtual keyboard and it is a mouse or mouse emulation it should work right out of the box, without adding any extra code to your application.
ALL devices that I know of that are specifically for impaired people work like that. With mouse emulation and the use of the virtual keyboard at start-up.
With the exception of visually impaired, perhaps, because I don't have much experience with that, or it is old.
I did and do a lot of these myself as volunteer.
In fpc this is not impossible, provided you have a microsoft signed binary for deployment. Costs money but sometimes you can get a certificate for a specific application for free after thorough examination by your local MS people and directly from microsoft. (little known but fact).
« Last Edit: August 26, 2016, 02:01:03 pm by Thaddy »
Specialize a type, not a var.

rvk

  • Hero Member
  • *****
  • Posts: 6112
Re: UI application to run over Windows logon screen
« Reply #7 on: August 26, 2016, 01:51:36 pm »
I know that what I am asking IS possible as I have seen other applications that do what I want. I am hoping that it can be achieved with Lazarus and that someone here can help me figure out how.
If another application can do it I think Lazarus can do it too.
The problem is (as you suspected) the tightened security in Windows.
(allowing application on the logon-screen is a real security threat)

Are those other application downloadable on the internet? (maybe you can name them)

Do you know if they use a service to interact with the current session (although there is no current session).
Or do they act as the accessibility tools?

I know there are some hacks to replace the 5x shift-dialog for example. Pressing 5 times shift on the logon screen will get you the accessibility tools. You can "hack" the registry to let it start your own application (although I've only seen examples to start cmd.exe because that's the most interesting to a hacker).

mig-31

  • Sr. Member
  • ****
  • Posts: 305
Lazarus 2.2.6 - OpenSuse Leap 15.4, Mageia 8, CentOS 7

Thaddy

  • Hero Member
  • *****
  • Posts: 14214
  • Probably until I exterminate Putin.
Re: UI application to run over Windows logon screen
« Reply #9 on: August 26, 2016, 02:01:49 pm »
Rik: you need a certificate if it is pre-login!
Specialize a type, not a var.

Thaddy

  • Hero Member
  • *****
  • Posts: 14214
  • Probably until I exterminate Putin.
Re: UI application to run over Windows logon screen
« Reply #10 on: August 26, 2016, 02:04:29 pm »
There is hack hwo to run any exe app on login screen.

http://www.askvg.com/how-to-launch-command-prompt-or-other-programs-using-ease-of-access-button-at-login-screen-in-windows-vista-and-7/

That is very limited and 32 bit only. Also doesn't work on windows 10. Most Windows versions are 64 bit versions nowadays except on old hardware.
Specialize a type, not a var.

rvk

  • Hero Member
  • *****
  • Posts: 6112
Re: UI application to run over Windows logon screen
« Reply #11 on: August 26, 2016, 02:24:59 pm »
Rik: you need a certificate if it is pre-login!
No it doesn't, not for the hack-method. (You do if you want to create a service)

If I create a registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\sethc.exe
and add a string (REG_SZ) with the name Debugger and value of my program (with complete path) I can press 5 times shift on my login screen and the given program starts instead of the accessibility tool dialog.

This still works in Windows 10 64bit (and starting a 32bit unsigned program).

So @fatmonk, maybe you can use that method (it is considered a hack) to start your own program (the user would have to press shift 5 times to start it).

« Last Edit: August 26, 2016, 02:30:02 pm by rvk »

balazsszekely

  • Guest
Re: UI application to run over Windows logon screen
« Reply #12 on: August 26, 2016, 02:38:59 pm »
Perhaps a more legit way to achieve the same thing is the Task Scheduler. You can add scheduled items via api.

Thaddy

  • Hero Member
  • *****
  • Posts: 14214
  • Probably until I exterminate Putin.
Re: UI application to run over Windows logon screen
« Reply #13 on: August 26, 2016, 02:41:43 pm »
Rik. How many users does your computer have?
Specialize a type, not a var.

rvk

  • Hero Member
  • *****
  • Posts: 6112
Re: UI application to run over Windows logon screen
« Reply #14 on: August 26, 2016, 03:12:26 pm »
Rik. How many users does your computer have?
Two, of which I'm the main user.

Perhaps a more legit way to achieve the same thing is the Task Scheduler. You can add scheduled items via api.
Services don't interact (standard) with a user-session so you would need to do some extra programming to achieve a GUI on the logon-screen (which would be hard to do because the login-gui is a protected environment).

(Note that a GUI was necessary on the logon-screen to interact with the user)
« Last Edit: August 26, 2016, 03:14:43 pm by rvk »

 

TinyPortal © 2005-2018