473,770 Members | 2,065 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to read the "view hidden/system files" Folder Options from within C#

Hi,

Can someone tell me where to look to enable me to read "Folder Options" user
settings for hidden/system files from within C#/VB.Net/Any other .NET
language. I'm pretty sure it must be part of the framework, but I'm buggered
if I can figure out which part. I've tried googling for it, but to no avail.

Any ideas?

Thanks

Greg
Nov 15 '05 #1
4 2898
These values are actually stored in the registry. Here is a link explaining
the keys and values.

http://www.winguides.com/registry/display.php/961/

--
Jared Parsons [MSFT]
ja******@online .microsoft.com
This posting is provided "AS IS" with no warranties, and confers no rights.
OR if you wish to include a script sample in your post please add "Use of
included script samples are subject to the terms specified at
http://www.microsoft.c om/info/cpyright.htm"
"Greg Bell" <no***@noneofyo urbusiness.com> wrote in message
news:Or******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi,

Can someone tell me where to look to enable me to read "Folder Options" user settings for hidden/system files from within C#/VB.Net/Any other .NET
language. I'm pretty sure it must be part of the framework, but I'm buggered if I can figure out which part. I've tried googling for it, but to no avail.
Any ideas?

Thanks

Greg

Nov 15 '05 #2
Hi Jared,

Thanks for that.

Much appreciated.

Regards

Greg

"Jared Parsons [MSFT]" <ja******@onlin e.microsoft.com > wrote in message
news:e9******** ********@TK2MSF TNGP11.phx.gbl. ..
These values are actually stored in the registry. Here is a link explaining the keys and values.

http://www.winguides.com/registry/display.php/961/

--
Jared Parsons [MSFT]
ja******@online .microsoft.com
This posting is provided "AS IS" with no warranties, and confers no rights. OR if you wish to include a script sample in your post please add "Use of
included script samples are subject to the terms specified at
http://www.microsoft.c om/info/cpyright.htm"
"Greg Bell" <no***@noneofyo urbusiness.com> wrote in message
news:Or******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi,

Can someone tell me where to look to enable me to read "Folder Options"

user
settings for hidden/system files from within C#/VB.Net/Any other .NET
language. I'm pretty sure it must be part of the framework, but I'm

buggered
if I can figure out which part. I've tried googling for it, but to no

avail.

Any ideas?

Thanks

Greg


Nov 15 '05 #3
Hi Jared and anyone else who might be watching this thread,

After some quick research, with help from your pointer, I have determined
that it's not ShowSuperHidden that controls the visibility of hidden or
system files. The field/item that needs to be read is "Hidden".

BTW: Code to access and read the value in C#.

//Determines if the current user has set Show Hidden/System files on or off.
private bool HiddenFilesAreI nvisible()
{
bool blnHideFiles = true;
RegistryKey rkyCurrentUser = Registry.Curren tUser;
rkyCurrentUser =
rkyCurrentUser. OpenSubKey(@"So ftware\Microsof t\Windows\Curre ntVersion\Explo r
er\Advanced",fa lse); //Open Read Only
string strShowHidden = rkyCurrentUser. GetValue("Hidde n").ToString ();
//According to my research when the "Hidden" field is set to 1 the files
are visible, when its' value is 2 they are invisible.
if(strShowHidde n=="1")
blnHideFiles = false;
rkyCurrentUser. Close();
return blnHideFiles;
}

Thanks

Regards

Greg

"Jared Parsons [MSFT]" <ja******@onlin e.microsoft.com > wrote in message
news:e9******** ********@TK2MSF TNGP11.phx.gbl. ..
These values are actually stored in the registry. Here is a link explaining the keys and values.

http://www.winguides.com/registry/display.php/961/

--
Jared Parsons [MSFT]
ja******@online .microsoft.com
This posting is provided "AS IS" with no warranties, and confers no rights. OR if you wish to include a script sample in your post please add "Use of
included script samples are subject to the terms specified at
http://www.microsoft.c om/info/cpyright.htm"
"Greg Bell" <no***@noneofyo urbusiness.com> wrote in message
news:Or******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi,

Can someone tell me where to look to enable me to read "Folder Options"

user
settings for hidden/system files from within C#/VB.Net/Any other .NET
language. I'm pretty sure it must be part of the framework, but I'm

buggered
if I can figure out which part. I've tried googling for it, but to no

avail.

Any ideas?

Thanks

Greg


Nov 15 '05 #4
Hi again,

Update as to where I found the bits I was looking for on editing the
registry.

http://www.csharphelp.com/archives2/archive430.html

Regards

Greg

"Jared Parsons [MSFT]" <ja******@onlin e.microsoft.com > wrote in message
news:e9******** ********@TK2MSF TNGP11.phx.gbl. ..
These values are actually stored in the registry. Here is a link explaining the keys and values.

http://www.winguides.com/registry/display.php/961/

--
Jared Parsons [MSFT]
ja******@online .microsoft.com
This posting is provided "AS IS" with no warranties, and confers no rights. OR if you wish to include a script sample in your post please add "Use of
included script samples are subject to the terms specified at
http://www.microsoft.c om/info/cpyright.htm"
"Greg Bell" <no***@noneofyo urbusiness.com> wrote in message
news:Or******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi,

Can someone tell me where to look to enable me to read "Folder Options"

user
settings for hidden/system files from within C#/VB.Net/Any other .NET
language. I'm pretty sure it must be part of the framework, but I'm

buggered
if I can figure out which part. I've tried googling for it, but to no

avail.

Any ideas?

Thanks

Greg


Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
16834
by: Rosa | last post by:
Hi, I'm trying to clear the TIF on Windows XP programmatically with the below code. This code works fine on any folder but the TIF. For some reason the atEnd() statements always defaults to true and no files are deleted in the folder. The peculiarity of this issue is that the files/subfolders cannot be seen through the windows explorer either. I can only access/delete them through a command shell. Any ideas?
1
1515
by: Sam Martin | last post by:
Hi all, Got a problem regarding auto-updating an application. We've got an app which implements the MS AppUpdater application block, however although this all works fine when logged in as an administrator - when running the app and trying to update with a latter version from a web server (note: the app is installed under the "Program Files" folder) - an exception is thrown as the normal user doesn't have permission to modify / create...
3
6131
by: Jim | last post by:
Is it possible to read the Temporary Internet Files folder using C#? I'm messing with FileIO (newbie here) and everything seems to work fine until I try to read the list of files in this Temporary Internet Files folder. I'm only received 1 file when I know there is more. Any suggestions are very appreciated. Thanks
1
1199
by: Tom Welch | last post by:
You can really mess up ASP.NET easily. 1. Create a new ASP.NET project. 2. Create a new folder on the web named System Now all objects in the System namespace are invalid because the compiler starts looking in <projectname>.System for them. You cannot compile or use any designers. WTF ?!?
4
2346
by: Nicolás Castagnet | last post by:
Hi, I write this post because I notice a strange behavior related with "Temporary Internet Files" and maybe some of you can help me to understand it. I am working in a web application with ASP.NET. Recently, I group of user have problems with it because the values of the sessions were not stored correctly (the application save the username in a login page, then other page try to get it and the result was always ""). We restart the web...
4
29215
by: pedestrian via DotNetMonster.com | last post by:
I'm using VB 2005. How to get the full path for "Program Files" folder in Windows, ie. either it is C:\Program Files or D:\Program Files or etc.? How about the full path of "Windows" folder? (either C:\Windows or C:\WINNT etc.) Thanks for replying... --
2
2062
by: Phaiz | last post by:
Not sure if you'd need an activex control but I'm looking for a script to change the folder view to "Classic View" within IE. I have an iframe that loads the users My Documents folder and would like it to display in 'Classic View' as opposed to the default 'Crap View' with the common tasks pane on the left-hand side. I'm very retarded with JS so please understand. Thanks
1
2943
by: ramesh.nrk | last post by:
Hi, How can I retrieve Files/Folder from the "System Volume Information" folders from my system using C# code? thanks & regards. ramesh
3
4764
by: =?Utf-8?B?S2Fyc3RlbiBMdW5kc2dhYXJk?= | last post by:
Hi, I have made an application in C#, where I use the statement Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) to get the name of the "Program Files" folder. It works fine in "Windows 2000" and "Windows XP", but it fails when I'm using "Windows Vista Ultima" in Danish. It returns "Program Files" instead of "Programmer". "Programmer " is the name of the folder in explore. Hope someone can help me - Thanks
6
1901
by: Academia | last post by:
I just installed VS2008 and Edit menu has "Quick Find" and "Quick Replace" but no "Find in Files" nor "Replace in Files" Help says: On the Edit menu "Find and Replace" should be there but it is not.
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10228
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10057
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10002
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7415
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6676
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5312
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3970
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 we have to send another system
2
3575
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.