Examples of AEWin32Access


Examples of org.gudy.azureus2.platform.win32.access.AEWin32Access

        // Constants.isWindows etc
     
      if ( file.getName().endsWith( ".exe" )){
       
        try{
          AEWin32Access accessor = AEWin32Manager.getAccessor(true);
         
          // accessor.createProcess( , false );
         
          String  s_args = null;
         
          if ( args.length > 0 ){
         
            s_args = "";
           
            for ( String s: args ){
             
              s_args += (s_args.length()==0?"":" ") + s;
            }
          }
         
          accessor.shellExecute(
            null,
            file.getAbsolutePath(),
            s_args,
            SystemProperties.getApplicationPath(),
            AEWin32Access.SW_NORMAL );
View Full Code Here

Examples of org.gudy.azureus2.platform.win32.access.AEWin32Access

  public static void
  main(
    String[]  args )
  {
    try{
      AEWin32Access access = AEWin32Manager.getAccessor(true);
     
      String  app_data = access.getUserAppData();
     
      System.out.println( "AppData = " + app_data );
 
      String  local_app_data = access.getLocalAppData();
     
      System.out.println( "Local AppData = " + local_app_data );

     
      List availableDrives = AEWin32AccessInterface.getAvailableDrives();
View Full Code Here

Examples of org.gudy.azureus2.platform.win32.access.AEWin32Access

      }
    }

    try {
      int result;
      AEWin32Access accessor = AEWin32Manager.getAccessor(true);
      if (accessor == null) {
        result = -123;
      } else {
        if (azRunner != null) {
          // create a batch file to run the updater, then to restart azureus
          // bceause the updater would restart azureus as administrator user
          // and confuse the user
          fileRestart = FileUtil.getUserFile("restart.bat");
          String s = "title Azureus Updater Runner\r\n";
          s += exeUpdater + " \"updateonly\"";
          for (int i = 1; i < parameters.length; i++) {
            s += " \"" + parameters[i].replaceAll("\\\"", "") + "\"";
          }
          s += "\r\n";
          s += "start \"\" \"" + azRunner + "\"";
         
          byte[]  bytes;
         
          String  encoding = FileUtil.getScriptCharsetEncoding();
         
          if ( encoding == null ){
            bytes = s.getBytes();
          }else{
            try{
              bytes = s.getBytes( encoding );
            }catch( Throwable e){
              e.printStackTrace();
             
              bytes = s.getBytes();
            }
          }
          FileUtil.writeBytesAsFile(fileRestart.getAbsolutePath(),bytes);

          result = accessor.shellExecute(null, fileRestart.getAbsolutePath(),
              null, SystemProperties.getApplicationPath(),
              AEWin32Access.SW_SHOWMINIMIZED);
        } else {
          String execEXE = "\"-J" + getClassPath().replaceAll("\\\"", "")
              + "\" ";

          for (int i = 0; i < properties.length; i++) {
            execEXE += "\"-J" + properties[i].replaceAll("\\\"", "") + "\" ";
          }

          for (int i = 0; i < parameters.length; i++) {
            execEXE += " \"" + parameters[i].replaceAll("\\\"", "") + "\"";
          }

          log.println("Launch via " + exeUpdater + " params " + execEXE);
          result = accessor.shellExecute(null, exeUpdater, execEXE,
              SystemProperties.getApplicationPath(), AEWin32Access.SW_NORMAL);
        }
      }

      /*
 
View Full Code Here

Examples of org.gudy.azureus2.platform.win32.access.AEWin32Access

  /**
   * Get the location of Windows Media Player executable
   * @return
   */
  public static String getWMP() {
    AEWin32Access accessor = AEWin32Manager.getAccessor(true);
    if (accessor == null) {
      return null;
    }
    try {
      return accessor.readStringValue(AEWin32Access.HKEY_LOCAL_MACHINE,
          "SOFTWARE\\Microsoft\\Multimedia\\WMPlayer", "Player.Path");
    } catch (Exception e) {
    }
    return null;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.