Jump to content
Sign in to follow this  
levis012

How to hidden file with autoit

Recommended Posts

levis012

hi everybody.

Iam is newbie, from vietnames.

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

Thanks

Edited by levis012

Share this post


Link to post
Share on other sites
SmOke_N

Why?


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
WILLYWILLYWILLY

Why?

Probably because he wants to hack someone's computer. He sounds likea Borat. His namea Borat.

Share this post


Link to post
Share on other sites
levis012

oh no

I just want to know.

Thanks

Share this post


Link to post
Share on other sites
FastJMAN1

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.

Share this post


Link to post
Share on other sites
Skitty

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

Things that I've done..

Icon Resource Editor: icon resource editor 

AutoIt Piano: a piano

AutoIt Unlocker: unlocks files when you want to delete them

Colorful tooltips: a wrapper for the tool tips UDF

Rouge GoogleBot: a full screen animation

ASciTE text editor: a text editor written in autoit

Warning: Posts by this user are subject to change or may disappear without notice.

Share this post


Link to post
Share on other sites
Mikeman27294

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.

Share this post


Link to post
Share on other sites
FastJMAN1

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

Share this post


Link to post
Share on other sites
Skitty

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

Things that I've done..

Icon Resource Editor: icon resource editor 

AutoIt Piano: a piano

AutoIt Unlocker: unlocks files when you want to delete them

Colorful tooltips: a wrapper for the tool tips UDF

Rouge GoogleBot: a full screen animation

ASciTE text editor: a text editor written in autoit

Warning: Posts by this user are subject to change or may disappear without notice.

Share this post


Link to post
Share on other sites
FastJMAN1

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.

Share this post


Link to post
Share on other sites
Skitty

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

Things that I've done..

Icon Resource Editor: icon resource editor 

AutoIt Piano: a piano

AutoIt Unlocker: unlocks files when you want to delete them

Colorful tooltips: a wrapper for the tool tips UDF

Rouge GoogleBot: a full screen animation

ASciTE text editor: a text editor written in autoit

Warning: Posts by this user are subject to change or may disappear without notice.

Share this post


Link to post
Share on other sites
FastJMAN1

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

Share this post


Link to post
Share on other sites
FaridAgl

Why?

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.

Edited by D4RKON3

Share this post


Link to post
Share on other sites
Skitty

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!


Things that I've done..

Icon Resource Editor: icon resource editor 

AutoIt Piano: a piano

AutoIt Unlocker: unlocks files when you want to delete them

Colorful tooltips: a wrapper for the tool tips UDF

Rouge GoogleBot: a full screen animation

ASciTE text editor: a text editor written in autoit

Warning: Posts by this user are subject to change or may disappear without notice.

Share this post


Link to post
Share on other sites
Skitty

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

Things that I've done..

Icon Resource Editor: icon resource editor 

AutoIt Piano: a piano

AutoIt Unlocker: unlocks files when you want to delete them

Colorful tooltips: a wrapper for the tool tips UDF

Rouge GoogleBot: a full screen animation

ASciTE text editor: a text editor written in autoit

Warning: Posts by this user are subject to change or may disappear without notice.

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
FaridAgl
As long as there will be hackers and genius minds for bad things , This world will Develop 50 times faster --> Heard Somewhere!

Share this post


Link to post
Share on other sites
FastJMAN1

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.

Share this post


Link to post
Share on other sites
FastJMAN1

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.

Share this post


Link to post
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
Sign in to follow this  

×