1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Application error if SystemRoot env variable is not properly on Win platform

Discussion in 'Java' started by prasanta123, Jul 28, 2010.

  1. prasanta123

    prasanta123 New Member

    Hi all

    By default SystemRoot is set by windows OS and all processes inherits environment from the parent process (i.e. SystemRoot is set properly).

    However if you configure your environment for a process ):
    java.lang.Runtime.exec(String[] cmdarray, String[] envp);
    Then if cmdarray = new String[]{"..../cvm.exe"....}; and envp massive does not have string "SystemRoot=C:\WINDOWS".
    You will get application error:
    "The application failed to initialize properly (0xc0150004). Click on OK to terminate the application."

    Can anyone please suggest (please point to some documentation/site) if it is a must to specify "SystemRoot=C:\WINDOWS" in envp & if it is valid to get this application error
    or if it is a bug in our code?

    Regards
    Prasanta
     

Share This Page