Create Folder Protection Software using C
Post date: Jun 10, 2011 3:36:40 AM
This is a Folder Protection Software in C which is compatible with Win98,WinNT,Win2000 Server.Will not work on Win Xp.By this software convert your folder to Control pannel using protection option.
And restore it by using unprotect option.
C Program for Folder \File Lock
#include<stdio.h>
#include<string.h>
#include<process.h>
void main()
{
FILE *p;
char ch,s[100];
char r[100]="REN ";
char u[]=".{21EC2020-3AEA-1069-A2DD-08002B30309D} ";
char v[50];
int choice,i;
//clrscr();
p=fopen("C:\a.bat","w+");
if(p==NULL)
{
printf("Error in opening the file a.c");
exit(0);
}
printf(" Boobalan's Folder Obscure");
printf(" File and Folder protection software in C By Boobalan");
printf("This software can convert your File/Folder to Control Paneland can Restore again.");
printf("Enter the path of the file");
fflush(stdin);
gets(s);
for(i=0;i<25;i++)
fputs("echo This software is not responsible for any loss in data",p);
printf("Enter choice :");
printf("1.Protect Folder/File");
printf("2.Unprotect folder/File");
printf("3.Exit");
scanf("%d",&choice);
switch(choice)
{
case 1:
strcat(r,s);
printf("Enter new name of your folder/file");
fflush(stdin);
gets(v);
strcat(r," ");
strcat(r,v);
strcat(r,u);
break;
case 2:
strcat(r,s);
strcat(r,u);
printf("Enter new name of your folder/file");
fflush(stdin);
gets(v);
strcat(r,v);
break;
default:
fclose(p);
remove("C:\a.bat");
exit(0);
}
{
fputs(r,p);
for(i=0;i<25;i++)
fputs("echo This software is not responsible for any loss in data ",p);
fputs("exit",p);
}
fclose(p);
system("C:\a.bat");
remove("C:\a.bat");
}