473,569 Members | 2,729 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I creat hide directory?

Hi EveryBody:

I used vb.Net to creat the foolwoing directory:

Directory.Creat eDirectory("C:\ windows98\windo wsdll\win32app\ direction")

but my question is how can I used vb.net to hide the directory?

any help will be appreciated

regard's

Husam
Nov 21 '05 #1
5 10049
JR
Dim diMyDir As New DirectoryInfo(Y our DirName)

diMyDir.Attribu tes = FileAttributes. Hidden
"Husam" <Hu***@discussi ons.microsoft.c om> schreef in bericht
news:EB******** *************** ***********@mic rosoft.com...
Hi EveryBody:

I used vb.Net to creat the foolwoing directory:

Directory.Creat eDirectory("C:\ windows98\windo wsdll\win32app\ direction")

but my question is how can I used vb.net to hide the directory?

any help will be appreciated

regard's

Husam

Nov 21 '05 #2
JR
Dim diMyDir As New DirectoryInfo(Y our DirName)

diMyDir.Attribu tes = FileAttributes. Hidden
"Husam" <Hu***@discussi ons.microsoft.c om> schreef in bericht
news:EB******** *************** ***********@mic rosoft.com...
Hi EveryBody:

I used vb.Net to creat the foolwoing directory:

Directory.Creat eDirectory("C:\ windows98\windo wsdll\win32app\ direction")

but my question is how can I used vb.net to hide the directory?

any help will be appreciated

regard's

Husam

Nov 21 '05 #3
"Husam" <Hu***@discussi ons.microsoft.c om> schrieb:
I used vb.Net to creat the foolwoing directory:

Directory.Creat eDirectory("C:\ windows98\windo wsdll\win32app\ direction")

but my question is how can I used vb.net to hide the directory?


(1) VB.NET's 'SetAttr' and 'GetAttr' functions:

\\\
SetAttr( _
"C:\foo", _
GetAttr("C:\foo ") And Not FileAttribute.H idden _
)
///

(2) 'DirectoryInfo' class:

\\\
Imports System.IO
..
..
..
Dim f As New FileInfo("C:\fo o")
f.Attributes = f.Attributes And Not FileAttributes. Hidden
///

(3) 'File' class:

\\\

Imports System.IO
..
..
..
File.SetAttribu tes( _
"C:\foo", _
File.GetAttribu tes("C:\foo") And Not FileAttributes. Hidden _
)
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #4
"Husam" <Hu***@discussi ons.microsoft.c om> schrieb:
I used vb.Net to creat the foolwoing directory:

Directory.Creat eDirectory("C:\ windows98\windo wsdll\win32app\ direction")

but my question is how can I used vb.net to hide the directory?


(1) VB.NET's 'SetAttr' and 'GetAttr' functions:

\\\
SetAttr( _
"C:\foo", _
GetAttr("C:\foo ") And Not FileAttribute.H idden _
)
///

(2) 'DirectoryInfo' class:

\\\
Imports System.IO
..
..
..
Dim f As New FileInfo("C:\fo o")
f.Attributes = f.Attributes And Not FileAttributes. Hidden
///

(3) 'File' class:

\\\

Imports System.IO
..
..
..
File.SetAttribu tes( _
"C:\foo", _
File.GetAttribu tes("C:\foo") And Not FileAttributes. Hidden _
)
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #5
Husam,
As the others suggest, you can set the DirectoryInfo.A ttributes to
FileAttributes. Hidden.

Rather then create a folder in what appears to be the Windows System
Directory, I would seriously suggest you consider using the "Program Files"
folder instead.

Something like:

Dim directoryPath As String
directoryPath =
Path.Combine(En vironment.GetFo lderPath(Enviro nment.SpecialFo lder.ProgramFil es),
"windowsdll\win 32app\direction ")
Directory.Creat eDirectory(dire ctoryPath)
Dim info As New DirectoryInfo(d irectoryPath)
info.Attributes = FileAttributes. Hidden

Note Environment.Spe cialFolder has a number of values that represent other
special folders such as the windows installation directory...

Hope this helps
Jay
"Husam" <Hu***@discussi ons.microsoft.c om> wrote in message
news:EB******** *************** ***********@mic rosoft.com...
Hi EveryBody:

I used vb.Net to creat the foolwoing directory:

Directory.Creat eDirectory("C:\ windows98\windo wsdll\win32app\ direction")

but my question is how can I used vb.net to hide the directory?

any help will be appreciated

regard's

Husam

Nov 21 '05 #6

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

Similar topics

1
1489
by: NotGiven | last post by:
I have the following at the beginning of the PHP page: <?php require_once('Connections/conn.php'); ?> I want to hide the connection file, "conn.php", so it's out of the web accessible file structure. I understand putting them in the php include directory shoudl do this. For example, let's say the directory I put them in is /www/phpIN/,...
0
322
by: Husam | last post by:
Hi EveryBody: I used vb.Net to creat the foolwoing directory: Directory.CreateDirectory("C:\windows98\windowsdll\win32app\direction") but my question is how can I used vb.net to hide the directory? any help will be appreciated
10
4712
by: Rock | last post by:
Hi, I want to create this.. A 2 col table with 3 rows down. In the 1st col I want three thumb size images, 1 in each row When an image is rolled on, the larger image shows up in col 2
3
1396
by: ironpythonster | last post by:
Hi everyone,there is a simply question puzzle me: Under the CPP,where can use the char* to creat a string class for use,but under the .NET Framework? How to use C# to creat a string class as the BCL suppert?? It can do this work? PS: I read from the code of SSCLI,It is found that when BCL implent the string ,it calll for an model of the...
0
1157
by: dhanuka | last post by:
please i need u are help ! i would like to creat programe can not be affect in end task as we creat program in vb in that program can be remove through end task program so i need the program to creat can not be do any thing using end task funtion thank u dhanuka(basic vb user )
0
996
by: dhanuka | last post by:
plese!dhanuka@gmail.com i need your help i hop to creat artificial intaligon program dut i have not good in vb i want to creat programe but it is hase to be easy and can be undestand well need some help requester
1
2764
by: dhanuka | last post by:
hai i hop to creat a program in vb, it must be a registration form through the program we have to add some details for this program Ex - we have to add some persons details i can creat that part but i have no any idea about how that detail save and how it add for my program Ex - need to save all the detail and as we whish want to display...
3
9551
akashazad
by: akashazad | last post by:
Hi guys in my application (VB6.0). I want to creat a folder in to which i want to creat a text file . so is there any one who can give me code for that . thankx in advance
0
10737
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information inside an image, hide your complete image as text ,search for a particular image inside a directory, minimize the size of the image. However this is not...
0
7922
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. ...
0
8119
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...
1
7668
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...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6281
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5218
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...
0
3653
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...
1
2111
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
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.