0 Replies Latest reply on Aug 2, 2011 10:27 AM by JasonRelish

    Issue with NativeProcess sandboxing

    JasonRelish

      I'm not complete sure that this is a sandboxing issue, but it seems like it is. I'm only not sure because I don't understand why some things here are being excluded and some aren't.

       

      Basically I'm writing a companion app for some other software and am using REG.EXE on Windows to determine which software is installed or not.

       

      If from the command line I type:

      reg QUERY HKLM\SOFTWARE\MyKey

       

      I get back:

      HKEY_LOCAL_MACHINE\SOFTWARE\MyKey\Key1

      HKEY_LOCAL_MACHINE\SOFTWARE\MyKey\Key2

      HKEY_LOCAL_MACHINE\SOFTWARE\MyKey\Key3

      HKEY_LOCAL_MACHINE\SOFTWARE\MyKey\Key4

       

      In my app I'm using this code:

      var processInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();

      processInfo.executable = new File("C:\\Windows\\System32\\reg.exe");

      processInfo.arguments = new <String>["QUERY", "HKLM\\SOFTWARE\\MyKey"];

      var process:NativeProcess = new NativeProcess();

      process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onOutputData);

      process.addEventListener(ProgressEvent.STANDARD_ERROR_DATA, onErrorData);

      process.addEventListener(NativeProcessExitEvent.EXIT, onExit);

      process.addEventListener(IOErrorEvent.STANDARD_OUTPUT_IO_ERROR, onIOError);

      process.addEventListener(IOErrorEvent.STANDARD_ERROR_IO_ERROR, onIOError);

      process.start(processInfo);

       

      Now, for whatever reason I'm only getting this output in my app

      HKEY_LOCAL_MACHINE\SOFTWARE\MyKey\Key3

       

      If I try to access Key1, Key2, Key4 I get an error that the key is invalid even though they are there. The only reason I would doubt that this is a sandbox issue is that I thought these values would all be stored in the same registry file.

       

      Anything that could help me solve this problem would be appreciated.