BOOL DeleteFile( LPCTSTR lpFileName ); // pointer to name of file to delete
int main(int argc, char *argv[]) { char *title = "title \"Mozila Firefox sound on/off \""; system(title); string path = ":\\Program Files\\Mozilla Firefox\\msacm32.dll"; int al=-1; cout<<"1. Opreste sunetul pentru Mozilla Firefox.\n" <<"2. Porneste sunetul pentru Mozilla Firefox.\n" <<"0. Iesire.\n"; while(al<0 || al>2){ cout<<"Alegerea dumneavoastra: "; cin >> al; } char disk = _getdrive() + 0x40; path = disk + path;
switch(al) { case 0: return EXIT_SUCCESS; break; case 1: { ofstream fout(path.c_str()); fout << "Fisier creat automat in scopul dezactivarii sunetului in Mozilla Firefox"; fout.close(); cout<< "Este necesar sa opriti si reporniti browserul ca schimbare sa aiba loc.\n"; } break; case 2: { DeleteFile(path.c_str()); cout<< "Sunetul a fost pornit.\n" ; } break; } system("PAUSE"); return EXIT_SUCCESS; }