473,503 Members | 544 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# Block Directory Access

alexis4
113 New Member
Hi!

Let's say I have a directory at C:\MyDirectory. As long as my application runs, I want nobody to have access there, not even to see it's contents. Is this possible?

Thanks in advance!
Dec 8 '09 #1
8 3175
tlhintoq
3,525 Recognized Expert Specialist
At best you can could change it's attribute to invisible.
But if the user has their PC FolderOptions set to show invisible items then it would still be seen.

Not having a folder be seen is really a means to an end... what is the end goal? Not not have files opened/deleted/added, for example?
Dec 8 '09 #2
alexis4
113 New Member
I am developing a full screen mode project for a public PC, and I want the windows key (along with all hotkeys) to be disabled. I have been searching the internet for the past days, but most people say that this cannot be done and some solutions I checked out do not work for the specific key. I always believe that anything can be done in Windows, so I am searching of alternative ways to do that. I did it with all other hotkeys, using indirect ways in some of them. Thus I am looking for a way to lock start menu folder. I don't know if this is going to work, but I have to try...
Dec 8 '09 #3
Dheeraj Joshi
1,123 Recognized Expert Top Contributor
You want to even block Ctrl+Alt+Delete .....? That do not a good idea....

I suppose you can not block all hot keys..

Regards
Dheeraj Joshi
Dec 9 '09 #4
alexis4
113 New Member
Well I do not know if Ctrl+Alt+Delete will be blocked, but I am in position to do that anyway. Propably I will say to the client that I am not going to deactivate taskmanager whether he wants it or not, because I know the risk of doing that. But the windows start key (together with CTRL+ESC that also opens the start menu) is something else and I can't deactivate them. I can't find anything wrong with unauthorized access prevention to start menu and just hiding the taskbar does not prevent that. This is why I thought of windows start folder blocking.
Dec 9 '09 #5
tlhintoq
3,525 Recognized Expert Specialist
This is for some sort of "public pc" like at kiosk or internet cafe, right?
So you have total control over what is installed and how it is configured, right?
If you are worried about guests starting applications from the start menu, then clear out the start menu so it is empty.

Otherwise, it might just be better to close the taskbar all together.

Or perhaps your kiosk application should simply be full screen and top-most so nothing other than your application can be seen or accessed.

Or put a two-head video card in the PC. Make the primary screen the one the guest doesn't see (and doesn't even have a monitor unless a service tech brings it with them). Give the guest the second screen where their permitted software is already configured to open.

Don't get tunnel-vision. You can spend weeks looking for solution 'a', or you can fall back, look at the problem from another angle and find a way to impliment solution 'b' in a couple hours.
Dec 9 '09 #6
alexis4
113 New Member
tlhintoq,

Thanks for the tips. My application is full screen and top-most and the taskbar is hidden, but start menu proves to be a real pain in the ***! I don't think that clearing the start menu is actually my responsibility, but the two-head video card could be an option.
However I strongly believe that if I could just deactivate the application that runs start menu with a file stream or something, the job could be done! If it is actually an application and not just a file open.

Thanks again!
Dec 9 '09 #7
GaryTexmo
1,501 Recognized Expert Top Contributor
I wonder if this would help....

http://www.codeproject.com/KB/cs/globalhook.aspx

I found that article a while back when I was making my friend a click counter. Perhaps it will allow you to detect when various keys (like the windows key, or control-escape) are pressed and take some kind of action?

Also, and I don't know, but what would happen if you overrode the WinProc method on your form and checked which messages get triggered when you press those buttons?

I really don't know the solution, I'm just throwing out ideas :)
Dec 9 '09 #8
alexis4
113 New Member
That is a really good article GaryTexmo, I will try that out! As for the WinProc method, I never really used it, so I may take a look there also and get my hands dirty if I have to!
Dec 10 '09 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1826
by: Steve O'maley | last post by:
I currently have the Exception Management Application Block working in my base directory, but when I create pages in a subfolder the Exception Management Application Block is never executed. The...
1
1374
by: Nikos Mitas | last post by:
I have this structure struct DIRECTORY{ char nameDir; struct DIRECTORY *parent; int numSubDir; struct DIRECTORY *subDir; }; and i allocate it with malloc.Is it possible instead of using an...
2
1070
by: Philip Townsend | last post by:
I am in the process of converting some web apps to implement the ADO application block. I have a copy the the applications on a local development server, in which I have successfully installed and...
165
6745
by: Dieter | last post by:
Hi. In the snippet of code below, I'm trying to understand why when the struct dirent ** namelist is declared with "file" scope, I don't have a problem freeing the allocated memory. But...
3
1546
by: tshah | last post by:
Hi. I am trying to use Data Access Application block provided by Microfost in Enterprise Library June 2005. The application I am devleoping is in ASP.NET. When I run my application and load up the...
7
9321
by: amitos | last post by:
Hi! I consider using the Logging Application Block, Enterprise Library, Jan 2006 in a major project. To date, I've found that some of its features are not very well documented. One important...
3
2901
by: SAL | last post by:
Hi, I have Microsoft Enterprise Library 2005 installed on my local system. I'm developing in C# using Visual Studio 2003 IDE with framework 1.1. I am automating a process that will use a DLL...
0
1007
by: =?Utf-8?B?bG9yaW5n?= | last post by:
Hi, I'm using UIP Application Block v2.0, I implemented a very simple application (a Controller and two pages) to get use to it. It works fine on my computer, but when I deploy it on my other...
0
1289
by: devil81 | last post by:
Hi: I would be extremely grateful if you could help me with what is quickly becoming a rather annoying code issue. I have coded a recursive emulation of ls -l and am completely stuck on coding...
0
7281
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7334
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6993
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5579
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3156
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1514
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
737
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.