title: What "cscript //NoLogo" stands for?
body: <p>This is a java program code that runs the Notepad program and pastes a specific text stored in this program itself....</p>
  
  <p>I was wondering if you can explain me the <code>String vbs</code> value, and also the <code>File file</code>, and the <code>("cscript //NoLogo " + file.getPath())</code> in the <code>Process p</code>.
  If you are as generous, then please explain me the whole code.</p>
  
  <p>I'm a beginner in Java, well not exactly but if u wanna judge from 0 to 10 i would be 1.5/10</p>
  
  <pre><code>import java.io.File;
  import java.io.FileWriter;
  import javax.swing.JTextField;
  
   public class PasteToNotepad {
  
     public static void main(String[] args) throws Exception {
       String text = "Some text for testing.";
       JTextField textField = new JTextField(text);
       textField.setSelectionStart(0);
       textField.setSelectionEnd(text.length() - 1);
       textField.copy();
  
       String vbs = ""
               + "Set WshShell = WScript.CreateObject(\"WScript.Shell\")\n"
               + "WshShell.Run \"notepad\", 9\n"
               + "WScript.Sleep 500\n"
               + "WshShell.SendKeys \"^V\"";
  
       File file = File.createTempFile("PrintDialog", ".vbs");
       file.deleteOnExit();
       FileWriter fw = new java.io.FileWriter(file);
       fw.write(vbs);
       fw.close();
       Process p = Runtime.getRuntime().exec("cscript //NoLogo " + file.getPath());
       p.waitFor();
     }
   }
  </code></pre>