Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Get Application start up path
- string path = Application.StartupPath;
- // Create Batch File Path
- string filePath = path + "\Hide.bat";
- // Write syntex to write in BAtch File
- string strToWrite = "attrib +h +s " + '"' + path + '"';
- // Create Batch File
- FileStream fs = new FileStream(filePath, FileMode.Create);
- StreamWriter sw = new StreamWriter(fs);
- sw.WriteLine(strToWrite);
- sw.Close();
- fs.Close();
Add Comment
Please, Sign In to add comment