|
-
Oct 7th, 2009, 04:03 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] How to hide a folder in XP
I am wanting to write a security application that will hide specified folders. How can I do this?
I have seen many examples, many of them just rename the folder and adds an extension like: .{f39a0dc0-9cc8-11d0-a599-00c04fd64433}
Is there a better way to do this? Someone can just rename the folder removing the extension.
Maybe a hook.... or is there an easier way?
thanks
Canning
Last edited by Simon Canning; Oct 7th, 2009 at 04:06 AM.
-
Oct 7th, 2009, 04:34 AM
#2
Hyperactive Member
Re: How to hide a folder in XP
im not sure..
maybe like this?
Code:
SetAttr "C:\FolderName", vbHidden
"More Heads are Better than One"
-
Oct 7th, 2009, 06:05 AM
#3
Re: How to hide a folder in XP
And, there is the API way
Code:
Private Declare Function SetFileAttributes Lib "kernel32" Alias "SetFileAttributesA" _
(ByVal lpFileName As String, ByVal dwFileAttributes As Long) As Long
Private Const FILE_ATTRIBUTE_ARCHIVE = &H20
Private Const FILE_ATTRIBUTE_COMPRESSED = &H800
Private Const FILE_ATTRIBUTE_DIRECTORY = &H10
Private Const FILE_ATTRIBUTE_HIDDEN = &H2
Private Const FILE_ATTRIBUTE_NORMAL = &H80
Private Const FILE_ATTRIBUTE_READONLY = &H1
Private Const FILE_ATTRIBUTE_SYSTEM = &H4
Private Const FILE_ATTRIBUTE_TEMPORARY = &H100
'After The Question Mark You Can Add Any Of The Following
'Archive, Compressed, Directory,Hidden,Normal,Read-Only, System, Or Temporary
'File = "What Ever File You Want!"
File = "c:\temp"
SetFileAttributes File, FILE_ATTRIBUTE_?
-
Oct 7th, 2009, 08:08 AM
#4
Hyperactive Member
Re: How to hide a folder in XP
Sure you can turn on the hidden attribute but then they can turn on "show hidden files and folders". I don't think people understand that you can't really use a high level language like VB6 to do things like this. Anyway, it's not the job of a programming language to provide security to your files. This is something that is handled with user accounts, rights, and permissions.
I'm waiting for a question like this:
"How can I use VB6 to cook my dinner?"
Last edited by danecook21; Oct 7th, 2009 at 08:16 AM.
-
Oct 7th, 2009, 10:36 PM
#5
Thread Starter
Frenzied Member
Re: How to hide a folder in XP
How does the professional programs do it? IE Lock Folder XP 3.7?
thanks
-
Oct 8th, 2009, 12:01 AM
#6
Re: How to hide a folder in XP
"Locking" a folder from deletion or just access?
I know I wouldnt want to install a program that locked me out of a folder on my system.
There is really no real reason to protect a folder programmatically. All folder protection should be done via Windows Security or Group Policy Objects.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 8th, 2009, 01:14 AM
#7
Thread Starter
Frenzied Member
Re: How to hide a folder in XP
just access. I want to make an app where the user can hide folders that have sensitive data.
-
Oct 8th, 2009, 01:18 AM
#8
Re: How to hide a folder in XP
If its sensetitive data then you should encrypt it and then no worries about accessing the folder.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 8th, 2009, 05:01 AM
#9
Thread Starter
Frenzied Member
Re: How to hide a folder in XP
I have already done an encryption app, i am wanting to make a hide folder app.
If i just encrypt it,they can see that there is a folder that has been encrypted, if it is hidden then they have no idea.
-
Oct 8th, 2009, 08:58 AM
#10
Re: How to hide a folder in XP
-
Oct 8th, 2009, 12:21 PM
#11
Re: How to hide a folder in XP
Didn't you ask this same question one year ago?
http://www.vbforums.com/showthread.php?t=537993
The professional applications install a driver, something you can't write with VB6.
-
Oct 8th, 2009, 03:01 PM
#12
Re: How to hide a folder in XP
 Originally Posted by RobDog888
"Locking" a folder from deletion or just access?
I know I wouldnt want to install a program that locked me out of a folder on my system.
There is really no real reason to protect a folder programmatically. All folder protection should be done via Windows Security or Group Policy Objects.
+1. I would recommend hiding sensitive files on a folder but not hiding the folder. Note that if you copy a backup file to a missing file that was originally hidden, you have to set the attribute to vbHidden after the file is restored, even if the backup file is also hidden.
-
Oct 8th, 2009, 10:07 PM
#13
Addicted Member
Re: How to hide a folder in XP
I am wanting to write a security application that will hide specified folders.
This is a bad idea. Stealthing a folder and it's contents can be exploited by malware. Remember the Sony DRM rootkit (and the class action lawsuits that went along with it)? Remember how it was exploited? You're asking how to do the exact same thing.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|