0 Replies Latest reply: May 22, 2013 4:12 AM by 989211 RSS

    file not getting copied from script

    989211
      I have built the msi installer using the tutorial and it works well. But in my application I need to start some java process for which I need access to java.exe.
      From this tutorial I wrote the below script:

      <?xml version="1.0" ?>
      <package>
      <job id="postImage">
      <script language="JScript">
      <![CDATA[ 
              var oFSO = new ActiveXObject("Scripting.FileSystemObject"); 
              var oFolder = oFSO.getFolder("."); 
              var from = "C:\\Program Files (x86)\\Java\\jdk1.7.0_21\\bin\\java.exe"; 
              var to = oFolder.path + "\\ABC\\runtime\\bin\\"; 
              if (!oFSO.FolderExists(to)) { 
                oFSO.CreateFolder(to); 
              }
      oFSO.CopyFile(from, to);
      ]]>
      </script>
      </job>
      </package>

      But I do not see it getting copied. Even after changing to " var to = oFolder.path + "\\Pina\\"; " to check if it actually copies yields no results.
      I can see the scipt being run as verbose prints:
      Using custom package resource [script to run after application image is populated] (loaded from package/windows/Pina-post-image.wsf on class path)

      What am I dong it wrong?

      Edit: I have observed that i copies java.exe in my "exe" installer but not to the actual msi installer. What should I do so that the msi installer also contains the java.exe file

      Edited by: 986208 on May 22, 2013 1:45 AM

      Edited by: 986208 on May 22, 2013 2:11 AM