Thread: Hiding a folder

  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    15

    Hiding a folder

    What is the command for hiding a specific folder?

    An example on how it should work.

    -> i run the program
    -> it automatically hides C:/Program files/something

    Basically I don't need to unreveal it ever again, so there is no need for an "unreveal" -function.

    The main reason for this program is to hide a folder so that whatever files in that folder cannot be opened. A friend of mine downloaded something and now there's a folder in the Program files that cannot be deleted, for "a program running cannot be deleted". Also tried to delete this folder in failsafe mode, -> no luck. Also tried to deactivate the program from running by trying to delete it from the taskmanager, yet "You don't have root-authorization.", which I do. Tried all kinds of tricks yet with no result. So I tried with a trial "Hide folder" -software to hide it and prevent it from ever running again, and it worked. Well, I'd be satisfied yet it's a trial, so I need a freeware, and I'd rather learn some C++ at the same, so hence I'd make the program myself with your assistance.
    Last edited by Salem; 03-20-2005 at 06:21 AM. Reason: Delete offensive folder name

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    I think you need to fdisk and start again with a different approach
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Mar 2005
    Posts
    15
    Well I'd rather not fdisk, would rather do the hide folder -solution.

  4. #4
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Quote Originally Posted by nextstep
    Also tried to deactivate the program from running by trying to delete it from the taskmanager, yet "You don't have root-authorization.", which I do.
    Sounds like your box is having an identity crisis - it thinks it's a *nix system

    If you don't mind hiding it rather then deleting it then couldn't you just ignore it?
    Folders do have a hidden attribute which can be set in the properties dialog box.
    Last edited by Quantum1024; 03-20-2005 at 06:48 AM.

  5. #5
    Registered User
    Join Date
    Mar 2005
    Posts
    15
    I'd still rather do the Hide folder -solution.

  6. #6
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > A friend of mine downloaded something and now there's a folder in the Program files that cannot be deleted,
    So you've no idea what this software your friend downloaded is doing?
    All manner of trojans, spyware, backdoors spring to mind.

    So rather than trying to clean up your system, your approach is to simply sweep it under the carpet as it were. Hell, if you can't see it, it can't be harmful right?

    Next time a "friend" wants to install something on your machine, ask a lot more questions about what it does and how to remove it. If they wont, then I'd suggest a different classification which doesn't include the word "friend" anymore.

    > Also tried to deactivate the program from running by trying to delete it from the taskmanager,
    http://www.sysinternals.com/
    Try process monitor (which provides far more detail than windows task manager) and the root kit revealer (which suggests the same symptoms as the ones you mention).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  7. #7
    Registered User
    Join Date
    Mar 2005
    Posts
    15
    Salem, I don't need advice on how to remove the problem, for I have already tried every possible way with a few it-expert friends of mine.

    The problem is solved: Hide folder -> prevent program from running. - Yet I need a freeware Hide folder program, and instead of downloading a cracked one or anything like that, I'd rather increase my knowledge in C++ by creating the program myself with your assistance.

    So would you just please, tell me the command for hiding a specific folder?

  8. #8
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Quote Originally Posted by nextstep

    The problem is solved: Hide folder -> prevent program from running. -
    I doubt it. Hiding things is usually done by hooking the APIs used to list files/directories these aren't used to automatically start programs.
    You wont find a built in command to do this, infact OSes are designed to not make this easy. The only way I know is to hook APIs and on win xp/2k I beleive that requires writing a driver.

  9. #9
    Registered User
    Join Date
    Mar 2005
    Posts
    15
    Well how about SetFileAttributes and FILE_ATTRIBUTE_HIDDEN ?

  10. #10
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    >> ... for I have already tried every possible way with a few it-expert friends of mine
    You and your experts can't do it so it must not be possible? And these "experts" don't know how to hide a folder or prevent a program from running? Do they even know that hiding a folder will never prevent a program from running ---- no, they don't.

    What are my startup programs?
    http://www.softpedia.com/progDownloa...load-1339.html

    What are my spyware programs?
    http://www.lavasoftusa.com/software/adaware/
    http://www.safer-networking.org/en/index.html

    Who has their fingers in my IE (as well as other ways to make things run)?
    http://www.tomcoyote.org/hjt/

    What virus's are on my computer?
    http://www.grisoft.com/

    gg

  11. #11
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    This is beginning to look like yet another proto script-kiddy who wants to move onto the next level by trying to hide their malware from ever more prying eyes
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  12. #12
    Registered User
    Join Date
    Mar 2005
    Posts
    15
    Thought this was a C++ forum, not Microsoft Helpdesk.

    Having the problem or not, I'd still require the Hide folder -program for personal use. So could you move the problem aside and focus on the C++?

    Now, has SetFileAttributes and FILE_ATTRIBUTE_HIDDEN something to do with what I'm trying to achieve(Hide folder)?

    [edit]:

    "This is beginning to look like yet another proto script-kiddy who wants to move onto the next level by trying to hide their malware from ever more prying eyes"

    -I'd rather drink my own pee than go for some wannabe-hacker -type of person.
    Last edited by nextstep; 03-20-2005 at 08:04 AM.

  13. #13
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Quote Originally Posted by nextstep
    Now, has SetFileAttributes and FILE_ATTRIBUTE_HIDDEN something to do with what I'm trying to achieve(Hide folder)?
    Dose the same as setting the "hidden" property in the properties dialog box.

  14. #14
    Registered User
    Join Date
    Mar 2005
    Posts
    15
    "Dose the same as setting the "hidden" property in the properties dialog box."

    -Well, can you tell me the command in C++, that does that?

  15. #15
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Quote Originally Posted by nextstep
    "Dose the same as setting the "hidden" property in the properties dialog box."

    -Well, can you tell me the command in C++, that does that?
    Set the property to hidden?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reading .dat files from a folder in current directory...
    By porsche911nfs in forum C++ Programming
    Replies: 7
    Last Post: 04-04-2009, 09:52 PM
  2. accessing all files in a folder.
    By pastitprogram in forum C++ Programming
    Replies: 15
    Last Post: 04-30-2008, 10:56 AM
  3. Problem in accessing root home folder....
    By Bargi in forum Linux Programming
    Replies: 1
    Last Post: 02-13-2008, 05:50 AM
  4. Not able to access directory of home folder
    By Bargi in forum Linux Programming
    Replies: 1
    Last Post: 02-06-2008, 02:45 AM
  5. read only folder on Windows
    By George2 in forum Windows Programming
    Replies: 2
    Last Post: 11-05-2007, 09:18 AM