Jump to content

How to hidden file with autoit


 Share

Recommended Posts

  • 2 weeks later...

Lol ><

@Op:

Use FileSetAtrrib:

FileSetAttrib("<PathToFile>","+H")

That only works in XP not Windows 7

I'm trying to find a way to do it in Windows7

I'm creating a floating toolbar and when you pick a icon from the desktop I want it to hide the icon that is on the desktop while the toolbar is running.

Does anyone know how to make the icon hide.

Link to comment
Share on other sites

hi everybody.

Iam is newbie, from vietnames.

I wan hidden file with autoit. Plese help me code.

Thanks

I don't think people like it when you attempt to hide stuff on their PC.

That only works in XP not Windows 7

I'm trying to find a way to do it in Windows7

I'm creating a floating toolbar and when you pick a icon from the desktop I want it to hide the icon that is on the desktop while the toolbar is running.

Does anyone know how to make the icon hide.

I think it does, you probably just disabled hidden files on your machine some time ago and forgot, or you didn't add the attribute "S".

Edited by THAT1ANONYMOUSEDUDE
Link to comment
Share on other sites

I don't think people like it when you attempt to hide stuff on their PC.

Hehe... Right click on desktop, View > Show Desktop Icons :graduated:

Anyway... if +H doesnt work for you, the chances are that you have somehow changed that (But I dont think that's even posible), or something is wrong with your computer.

Link to comment
Share on other sites

I don't think people like it when you attempt to hide stuff on their PC.

I think it does, you probably just disabled hidden files on your machine some time ago and forgot, or you didn't add the attribute "S".

What do you mean about "S" attribute

I hide the icon with this

Global $1Icon = FileReadLine($vfile, 2)

FileSetAttrib($1Icon, "+H", 1)

RefreshDesktop()

I show the icon with this

Global $1Icon = FileReadLine($vfile, 2)

FileSetAttrib($1Icon, "-H", 1)

RefreshDesktop()

This works perfect on XP Pro and does not work on Windows7

I have

Windows 7 Ultimate

32bit or x86

Link to comment
Share on other sites

What do you mean about "S" attribute

I hide the icon with this

Global $1Icon = FileReadLine($vfile, 2)

FileSetAttrib($1Icon, "+H", 1)

RefreshDesktop()

I show the icon with this

Global $1Icon = FileReadLine($vfile, 2)

FileSetAttrib($1Icon, "-H", 1)

RefreshDesktop()

This works perfect on XP Pro and does not work on Windows7

I have

Windows 7 Ultimate

32bit or x86

If you haven't messed with window 7's default folder options, then setting something to the "H" attribute (Hidden) will just make it semi transparent, setting it to the "S" attribute (System) will make it not show up.

FileSetAttrib($1Icon, "+HS", 1)

Scratch that, I was totally wrong and remembering things incorrectly, I believe the reason it might not be working for you is because you or some one has messed with the control panels "Folder options" and disabled hidden files, check those settings.

Check the "Hide protected operating system files" and "Show hidden files and folders" options under "Folder Options".

:graduated:

Edit: I'm interested, why are you choosing to hide a desktop icon instead of using a nifty tray menu icon instead? That way you can use different colored icons like a green and red one that can be changed to signify something?

Using that your method is not common since most people disable hidden files and folders altogether, even though it says that it is recommended to keep these files hidden, I would not recommend it at all since malicious code use these tactics to hide unwanted files.

Edited by THAT1ANONYMOUSEDUDE
Link to comment
Share on other sites

If you haven't messed with window 7's default folder options, then setting something to the "H" attribute (Hidden) will just make it semi transparent, setting it to the "S" attribute (System) will make it not show up.

FileSetAttrib($1Icon, "+HS", 1)

Scratch that, I was totally wrong and remembering things incorrectly, I believe the reason it might not be working for you is because you or some one has messed with the control panels "Folder options" and disabled hidden files, check those settings.

Check the "Hide protected operating system files" and "Show hidden files and folders" options under "Folder Options".

:graduated:

Edit: I'm interested, why are you choosing to hide a desktop icon instead of using a nifty tray menu icon instead? That way you can use different colored icons like a green and red one that can be changed to signify something?

Using that method is not common since most people disable hidden files and folders altogether, even though it says that it is recommended to keep these files hidden, I would not recommend it at all since malicious code use these tactics to hide unwanted files.

You are correct the show hidden files was checked but I would had thought that would not matter, that is wierd. I had the same check in XP but everything worked correctly. Windows7 is a beast all on its own.

Thanks for the help

Is there anyway to make autoit check to see if the show hidden files is checked and If so uncheck it and check the Don't show hidden files. In the back ground not mouse move.

Link to comment
Share on other sites

You are correct the show hidden files was checked but I would had thought that would not matter, that is wierd. I had the same check in XP but everything worked correctly. Windows7 is a beast all on its own.

Thanks for the help

Is there anyway to make autoit check to see if the show hidden files is checked and If so uncheck it and check the Don't show hidden files. In the back ground not mouse move.

Switch RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced","hidden")
    Case 1
       Switch MsgBox(68,"Hidden files","Hidden files disabled"&@CR&"Enable?")
           Case 6
               RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced","hidden","REG_DWORD",2)
       EndSwitch
    Case 2
        MsgBox(64,"Hidden files","Hidden files enabled")
EndSwitch
;RefreshDesktop();Is this a udf function?

Like this?

Edited by THAT1ANONYMOUSEDUDE
Link to comment
Share on other sites

Switch RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced","hidden")
    Case 1
       Switch MsgBox(68,"Hidden files","Hidden files disabled"&@CR&"Enable?")
           Case 6
               RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced","hidden","REG_DWORD",2)
       EndSwitch
    Case 2
        MsgBox(64,"Hidden files","Hidden files enabled")
EndSwitch
;RefreshDesktop();Is this a udf function?

Like this?

Awesome work, Thanks a lot.

This is not a UDF RefreshDesktop()

This is the function...

Func RefreshDesktop()

ControlSend('Program Manager', '', '', '{F5}')

EndFunc

Link to comment
Share on other sites

Awesome work, Thanks a lot.

This is not a UDF RefreshDesktop()

This is the function...

Func RefreshDesktop()

ControlSend('Program Manager', '', '', '{F5}')

EndFunc

Oh, cool.

FYI, I think UDF is an acronym for "User Defined Function(s)" so I think it would be considered a udf.

Anyway, glad I could be of assistance!

Link to comment
Share on other sites

cute question!

i think it's possible to use command line and you can even hide that file as a system file. i never tried it.

haha, oh wow.

I don't think it's a good idea to insult someone who can ban you, it's a legit question in the aspect that the first post sounds like if the user has some kind of malicious intention.

Edited by THAT1ANONYMOUSEDUDE
Link to comment
Share on other sites

  • Developers

cute question!

Meaning what?

Iam sure you don't want to pay a dollar to all noobs that come here to either do illegal stuff or shoot themselves in the foot.

So what is soo cute about asking why they want it when asked like the OP did?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Meaning what?

Iam sure you don't want to pay a dollar to all noobs that come here to either do illegal stuff or shoot themselves in the foot.

So what is soo cute about asking why they want it when asked like the OP did?

Jos

I agree with Jos 100%. It never hurts to ask. But as for the first post it did not sound like his intrest was to learn. You must learn to walk before you can run. Take me for example, I have created all kinds of neat and usefull items that help me at work. I have created hyperlink GUIs and I have messed around with GDIplus a lot, so for someone like me to ask how to hide an icon from the desktop that will never be used as a hack of any sort is not far fetched.

I mean, think of it this way. Why create a dock if it is not going to at lease hide the desktop icons that the dock has on it?

THAT1ANONYMOUSEDUDE

You are correct it is a UDF. I was thinking of include when I answered the first time.

Link to comment
Share on other sites

If you haven't messed with window 7's default folder options, then setting something to the "H" attribute (Hidden) will just make it semi transparent, setting it to the "S" attribute (System) will make it not show up.

FileSetAttrib($1Icon, "+HS", 1)

Scratch that, I was totally wrong and remembering things incorrectly, I believe the reason it might not be working for you is because you or some one has messed with the control panels "Folder options" and disabled hidden files, check those settings.

Check the "Hide protected operating system files" and "Show hidden files and folders" options under "Folder Options".

:graduated:

Edit: I'm interested, why are you choosing to hide a desktop icon instead of using a nifty tray menu icon instead? That way you can use different colored icons like a green and red one that can be changed to signify something?

Using that your method is not common since most people disable hidden files and folders altogether, even though it says that it is recommended to keep these files hidden, I would not recommend it at all since malicious code use these tactics to hide unwanted files.

The dock I have created is kind of like StarDock stuff. It is a floating dock that can be draged and I have it to install 2000 icons to choice from so that you can change any Icon that is on the dock. This is why I need to hide only the selected icons and then make them not hidden when the dock is closed.

As for malicious code, LOL

Anyone who learns Autoit can do malicious code if they really wanted to or at least I know I could if I wanted too. My question was not malicious at all because I clearly stated that the code I posted was working in XP at my work place but when I tried it at home on Windows7 it did not work correctly anymore.

Thanks for all your help, once I finish the dock I will PM you guys that helped out with this, and I will send the download link to you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...