Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Execução de Comandos [.bat]: Tela de prompt
- try
- {
- Runtime.getRuntime().exec("cmd /c \"echo ========= Anotacoes ========= > %userprofile%\\desktop\\oi.txt\"");
- Runtime.getRuntime().exec("cmd /c \"echo Computador: %computername% >> %userprofile%\\desktop\\oi.txt\"");
- Runtime.getRuntime().exec("cmd /c \"echo Diretorio: %userprofile% >> %userprofile%\\desktop\\oi.txt\"");
- Runtime.getRuntime().exec("cmd /c \"echo Nome: %username% >> %userprofile%\\desktop\\oi.txt\"");
- Runtime.getRuntime().exec("cmd /c \"echo. >> %userprofile%\\desktop\\oi.txt\"");
- }
- catch(IOException e)
- {
- System.err.println(e);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement