MakkyNZ
MakkyNZ

Reputation: 2257

Run C# application on startup before desktop is accesible

Before using my company's desktops, employees must acknowledge certain T&Cs. My company has asked me to build an app that will show these T&Cs to the user once they have logged in. They should be blocked from accessing the desktop while viewing this app, and if they choose to the decline the t&Cs, the app will automatically log them out.

I've tried creating an app that opens in fullscreen mode on startup, but I have the problem where a user can get around the app by doing something like pressing the Windows key to show the start menu. I'm sure there are other keyboards shortcuts to get the around app too.

I think I'm going about this the wrong way.
A more ideal solution would be for the user to enter a proper kiosk mode of Windows (with the app running), and then once they click the accept T&Cs button, it will direct them to the proper desktop mode of Windows. Is this somehow possible?

There are various versions of Windows being used (7 and up) and also most users use dual monitors.

Upvotes: 0

Views: 465

Answers (2)

CodeCaster
CodeCaster

Reputation: 151586

You could configure a custom Shell Launcher which launches your app, if you're running supported Windows version (10 Enterprise, 10 Education) or custom user shells as explained in How to run an application as shell replacement on Windows 10 Enterprise.

Upon accepting the Terms and Conditions (or when the current user has already accepted them before), your app simply launches explorer.exe to start the default shell.

To prevent users from starting the Explorer shell through the Task Manager, you'll have to disable Task Manager through a group policy as well.

Upvotes: 1

jason.kaisersmith
jason.kaisersmith

Reputation: 9610

In Windows you can create a Logon Banner or legal notice. This displays before the user is able to login, and they must click OK to accept it.

Therefore, if they have logged in then then must have clicked OK to accept the T&Cs.

Some links about this; http://www.thewindowsclub.com/displaying-customized-start-message-windows-8

https://youtu.be/1IrpsunSXBk

Upvotes: 1

Related Questions