char pass[15]=""; ofstream lfolder; char folder[200]={0}; CString Foldername; CString drive; char tempfolder[200]={'0'}; char attributes[50]={'0'}; drive = "D:\\TestFolder"; sprintf_s(folder, "%s", drive); strcpy(tempfolder, folder); strcat(folder, "\\Desktop.ini"); lfolder.open(folder, ios::out); lfolder << "[.shellClassInfo]" << endl; lfolder << "CLSID = {2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}" << endl; lfolder.close(); strcpy(attributes, "attrib +h +s "); strcat(attributes, tempfolder); WinExec(attributes, NULL);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)