|
|
|
|
#1 |
|
Junior Member
Join Date: Aug 2008
Posts: 13
|
How do I unhide then hide files during install?
In one of the steps I need to unhide files (visible in their folder during install) then unhide them.
I found a registry key that does that and it works but only if the user logs off and logs on again - which stop the execution of my installer. I noticed that in windows xp in folder options when you select hide/unhide and press the apply button this happen immediately without having to logoff/logon. How do they do that? Can I do something similar in NSIS? |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
Don't mess with the users explorer settings!
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Aug 2008
Posts: 13
|
Thanks Anders for your advice. It is good in general but in my special case I need this for an internal company application.
If I can't do this via NSIS I will have to find a way to do this via win32 API. I tried ${RefreshShellIcons} but this doesn't help. Any ideas? |
|
|
|
|
|
#4 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
You would have to refresh every explorer window, you can probably do that with COM (CLSID_ShellWindows/IID_IShellWindows)
See http://blogs.msdn.com/oldnewthing/ar...20/188696.aspx for more IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#5 |
|
Major Dude
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
|
hmm...
Maybe instead of messing with the user's explorer settings, you could simply change the file/folder attributes to remove and then set the "hidden" flag? My thought is that perhaps you could just use attrib.exe (which I believe is included with all Windows installation). Or you might find a plugin or API call to do the same. edit yes, SetFileAttributes should work. (Thanks Anders). I knew I read that somewhere; go figure it'd be in the NSIS help file!
|
|
|
|
|
|
#6 | |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
Quote:
IntOp $PostCount $PostCount + 1 |
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|