473,387 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 2877
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.com/info/cpyright.htm"
"Greg Bell" <no***@noneofyourbusiness.com> wrote in message
news:Or****************@TK2MSFTNGP09.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******@online.microsoft.com> wrote in message
news:e9****************@TK2MSFTNGP11.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.com/info/cpyright.htm"
"Greg Bell" <no***@noneofyourbusiness.com> wrote in message
news:Or****************@TK2MSFTNGP09.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 HiddenFilesAreInvisible()
{
bool blnHideFiles = true;
RegistryKey rkyCurrentUser = Registry.CurrentUser;
rkyCurrentUser =
rkyCurrentUser.OpenSubKey(@"Software\Microsoft\Win dows\CurrentVersion\Explor
er\Advanced",false); //Open Read Only
string strShowHidden = rkyCurrentUser.GetValue("Hidden").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(strShowHidden=="1")
blnHideFiles = false;
rkyCurrentUser.Close();
return blnHideFiles;
}

Thanks

Regards

Greg

"Jared Parsons [MSFT]" <ja******@online.microsoft.com> wrote in message
news:e9****************@TK2MSFTNGP11.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.com/info/cpyright.htm"
"Greg Bell" <no***@noneofyourbusiness.com> wrote in message
news:Or****************@TK2MSFTNGP09.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******@online.microsoft.com> wrote in message
news:e9****************@TK2MSFTNGP11.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.com/info/cpyright.htm"
"Greg Bell" <no***@noneofyourbusiness.com> wrote in message
news:Or****************@TK2MSFTNGP09.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
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...
1
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...
3
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...
1
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...
4
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...
4
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?...
2
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...
1
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
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...
6
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...

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.