Advertisement
metalx1000

run batch file hidden with vbs

Mar 3rd, 2022
2,825
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Set objFSO=CreateObject("Scripting.FileSystemObject")
  2.  
  3. ' create batch file
  4. outFile="go.bat"
  5. Set objFile = objFSO.CreateTextFile(outFile,True)
  6.  
  7. 'zenity for window https://github.com/maravento/winzenity
  8. objFile.Write "zenity --info --text=""Hello World""" & vbCrLf
  9. objFile.WriteLine "zenity --info --text=""Hello Planet""" & vbCrLf
  10. objFile.WriteLine "zenity --info --text=""Hello Earth""" & vbCrLf
  11. objFile.close
  12.  
  13. 'run file
  14. CreateObject("Wscript.Shell").Run "go.bat", 0, True
  15.  
  16. 'delete batch file
  17. objFSO.DeleteFile("go.bat")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement