Disable everything in windows except program c# - c#

I've got the following question:
Is it possible te disable everything in windows except the program it's running?
I need to program an application on a touchscreen (fullscreen), where people can fill in a survey.
The only thing they should use is this program. (for protection of the survey anwsers and other secret stuff :p )
And the program should be closed when entering the right password.
So how can I disable everything else but the program I'm running?
Thanks

You should investigate Kiosk Mode. It might not be the right solution for your particular case, but it is an accepted way of restricting users to one application.
Kiosk Mode in IE
Basically you make the application full screen and disable things like the task bar etc.:
Disable the start menu and other stuff through the Group Policy Management
for the local computer (run gpedit.msc -> User Configuration ->
Administrative templates -> Start menu and Taskbar).
Source

This KB entry describes how to do that the best way by replacing the shell.

Related

Disable Taskbar in Windows 10

Is there any way to completely disable the taskbar in Windows 10 Home? I have a C# app that I want to display fullscreen on clients' displays without any sign of it running on Windows. It's supposed to run on startup and display a website.
I created a setup that changes most of the Windows settings via registry, like hiding desktop icons and altering logon view, but the taskbar remains visible. Auto hide doesn't satisfy me, because after the system boots the taskbar is still visible until you actually click somewhere on the desktop, and it takes a while for my app to run. I'd really appreciate some help.
When explorer is running, there taskbar will always be visible in some kind (even if it's a small border).
If you want to achieve something like a digital signage solution, you may replace the shell. Changing the shell will also provide some other benefits (most popups / balloontips won't occur anymore).
Be aware that this configuration is effective for all users on the system.
Path to the shell is available at
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Shell
Update:
Just to hightlight:
It is indeed possible to have custom shells per user (see comments).
This is done by specifying a custom location of the shell path that is located in the registry for a given user.
Yes, you can totally disable the taskbar in Windows 10 but it is only temporary until you hover your mouse around the taskbar area.
Here's a tutorial: how to hide the taskbar in Windows 10

Is it possible to bind running application to a shortcut key?

Say I have started application on Windows (created in WPF for .NET in case that would help), that opens some windows/panels and just runs in a background. User don't want to interact with it constantly, however once in a while needs to urgently execute some actions in it.
Is it possible to bind some key shortcut e.g. alt+key to running application, so on hitting it app gets focus? It doesn't necessarily need to be brought to front, altough that would be nice as well.
"a hotkey that works out of your application" is this what you want?
if so, you need global hotkey that i can reference to!
(Sorry i didn't have enough reputation for commenting!)
I think I found sort of semi-solution, that doesn't need any coding or changing any system settings, but only:
1) keyboard with Windows key
2) possibly forcing user to re-arrange icons on his task bar (or pin my application as one of first 9 applications on his taskbar)
pressing WinKey+digit brings up digit'th application from the taskbar. Pressing it again hides it.
This works for Windows 7.
Obiously doing this way is a bit lame and not customizable at all, but it's always something... Still happy to find better way if there exists such.

Is it possible to programmatically lock a windows phone 7 device?

I'm creating a WP7 app that needs to continue running when the user is not using the phone - ideally the user sets it going, locks the phone and carries on with their life.
Is this possible?
I know it is possible to disable the lock screen, so if the user were to just leave the phone on a table it would be fine and carry on running. The problem is when they put it in their pocket - buttons will get pressed such at the windows/home button, and if this happens then the app is tombstoned straight away.
Any ideas if this is possible? Either somehow locking the phone without tombstoning the app, or implementing a sort of custom lock screen and handling the events for all the hardware buttons including the windows/home button?
Any suggestions will be appreciated.
Just as you figured out:
PhoneApplicationService.Current.ApplicationIdleMode = IdleDetectionMode.Disabled
No need to ask user for permission anymore (since the original 6.3.1 "Configurable Functionality" was dropped). However, there are other Marketplace certification requirements to consider, see section 6.3: http://go.microsoft.com/fwlink/?LinkID=183220
I think I've done it again - asking questions too soon.
I believe the following setting:
PhoneApplicationService.Current.ApplicationIdleMode = IdleDetectionMode.Disabled
will enable the application to run under a lock screen.

How to allow users only interactive with my program?

I'm writing a software for a call-center. It's somewhat like a ATM program: user can only interactive with it, not with underlying Windows. It takes controls when user logs in to Windows, and when user exits, it logs off Windows.
How can I do that in .NET? A demo will be much appreciated.
Thank you.
Replace the Windows Shell.
By that I mean Explorer.exe, by means of editing the Windows Registry. What this does for you is instead of logging on and the system running Explorer.exe which consists of the Start Menu, Taskbar and other similar features you are familiar with, it only runs your program. There is no desktop, no context menu, no taskbar, or start menu. Thus, making your application "The Shell" or the new "Explorer.exe".
However, by doing this the user still has access to Control+Alt+Delete, so they would still be able to access the Windows Task Manager, which mind you can also be disabled via a simple Registry Key Entry.
This is the most pain free, easiest solution because you don't even have to worry about things such as disabling the WindowsKey or other annoyances.
The registry key to this is as follows:
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
The name of the value to modify is:
Shell
And you can simply enter the value to be the fully qualified path to your program's executable file. You will only want to do this under HKEY_CURRENT_USER and only for the account that is to run your shell program. So you will need two separate accounts.
Administrator account
This account will just be a normal password protected account that will be used to manage the system
Kiosk account
This account will be the account that is logged on at all times, which runs your custom shell (your application)
Additional Notes
To disable the Task Manager the registry path is as follows:
Software\Microsoft\Windows\CurrentVersion\Policies\System
The name of the value is:
DisableTaskMgr
This is a DWORD value which to enforce the policy must be set to '1'.
What I did was to use DirectX and just use full-screen and exclusive modes, which you can see a small example of here: http://www.directxtutorial.com/tutorial9/b-direct3dbasics/dx9B2.aspx.
This is more work, but it will allow you to do what you want.
Depending on what control you have, there are steps you can do with group policy to limit what people can do on the computer. You can look at how people set up a kiosk application on Windows for some ideas.
What you want to do is run the OS in "kiosk mode".
This entails using the Group Policy Management Console to apply the kiosk mode template - as part of this you register your application as the shell.
As such there is no taskbar, or explorer view to fall back on to. The only way to run the usual shell would be to connect a keyboard to the system - press ctl-alt-delete and run explorer from the taskmanager that pops up.
And you can disable even the standard task manager if users are going to have keyboard access to the console. You will want to implement some kind of launch explorer.exe interface otherwise the system might become a bit difficult to manage :P
You can set your applications window to be always on top and to cover the entire screen. If you exclude buttons that close the window the user must know that ALT+F4 closes the window in order to exit. This has been good enough for me those times I've needed it.

Conditions of Use dialog for Windows logins

I need to design a "Conditions of Use" dialog that is presented to users after they logon to Windows XP. It must not allow the user to proceed until they check an "I agree" box. It must not be possible to shut it using Task Manager or any other method. And it should be fullscreen and modal. The "I agree" will remain checked automatically during subsequent logins for the duration of 1 month, after which the user will need to check it again. Also HR want to track who has checked the checkbox.
Is such a thing possible using .Net? I can use C# to design it but I'm not sure about how to prevent users from bypassing the dialog.
I know Windows Group Policy allows a dialog to be presented before login, but that does not allow a checkbox or any customization.
Any thoughts?
In older versions of Windows, it used to be possible to implement your own winlogon.exe, that's the application that presents the log-in user-interface. It's not so easy now, and for good reasons, Microsoft have invested a lot more effort in security than the average Joe Coder would!
Once you are past the login, the operating system becomes a little bit of a free-for all, but only because winlogon's first task is is spawn EXPLORER.EXE, if you replace the shell with your own that in turn spawns explorer when your entry criteria have been met, you will get the behaviour your want. You will, as you commented, need to disable the task-manager as this gives an opportunity to launch other applications.
Changing the default shell (all users):
open regedit (start menu > run, and type in regedit)
go to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon.
Change Shell from explorer.exe to the new shell path e.g your application
log out and log back in.
Changing the default shell (only current user):
open regedit (start menu > run, and type in regedit).
go to: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon.
add a new string value (Edit > New > String Value) called shell. and set the value to the path of the new shell e.g your application.
log out and log back in.
Perhaps this alternative may make things simpler... It has no checkbox.. no code...but you still force the user to acknowledge the policy and you still get to see who logs on (via the security log)
Alter the following Local Security Policies on the machine (via secpol.msc)
Set Interactive Login:Message Text For Users attempting to Log on to your warning
Set Interactive Login:Message Title For Users attempting to Log on to the title of your warning
These can be found in Security Settings\Local Policies\Security Options
Also consider Interactive Login:Do not display user last name and adjust your logging policy accordingly...
Hope that helps..
You should try to substitute a windows shell program (explorer.exe). It possible to do in system registry. And do any interaction with user from your program, and then run a standard shell.

Categories