I have made a small application which can be used to hide files and folder and u have to specify a password to ulock that file.
I am stoing that password in file which reside in system folder. Appliction is working quite good in XP but the problem arises when try to run it WINDOWS 7(the secure plateform) which does not allow any program to make any file/folder in sytem folders.
Is there any way so that I can FORCE creation/updation of any file in the system folder.
Bechir BejaouiPosted Sep 11, 2010, 9:25 AM
You can write a small code that modify the registy key
http://msdn.microsoft.com/en-us/library/microsoft.win32.registrykey.aspx
You can use
HKEY_LOCAL_MACHINE SOFTWAREMicrosoftWindows
CurrentVersion Explorer AdvancedFolderHidden SHOWALL
That set the visibility on the system folder on windows 7
http://www.webtlk.com/2009/04/09/how-to-force-windows-to-show-hidden-files-and-floders/
But you have to have the right permission to do this then you have to implement impersonation to provide the user the proper rights to execute the code under you conditions
The code must also be protected to prevent hacker from miss use it. You have to implement Register key permissions on your code
http://msdn.microsoft.com/en-us/library/system.security.permissions.registrypermission(VS.80).aspx