1 Reply Latest reply on Jun 26, 2012 11:28 PM by aswathykrishnan

    Cmd.exe execution problem

    aswathykrishnan

      I have to run cmd command in my air application. I could run it using native process execution, but after installation it only works in "Windows 7" not in "Windows XP". What will be the reason??

       

      Please help.....!

        • 1. Re: Cmd.exe execution problem
          aswathykrishnan Level 1

          Issue has been resolved by changing argument passing method.....!

           

          I had given commands as following

           

           

          var process:NativeProcess                       =          new    NativeProcess();

          var info:NativeProcessStartupInfo              =          new NativeProcessStartupInfo();

           

          info.executable                                        =          new File(rootDrive+"\\WINDOWS\\system32\\cmd.exe");

          info.workingDirectory                                =          File.applicationDirectory;

           

          process.start(info);

          process.standardInput.writeUTFBytes("/c "test.exe"  "source.url"  "destn.url" "\n")

           

          This was not working in Windows XP. Then i gave argument like this,

           

          var args:Vector.<String>                            =          new Vector.<String>();

          args.push("/c");

          args.push("test.exe");

          args.push("source.url);

          args.push("destn.url");

           

          info.arguments                                           =     args;

          process.start(info);

           

          This got worked in Windows XP ..............

           

          Thanks