Process command and autorun variable

Discussion in 'Java' started by Greg, Sep 28, 2012.

  1. Greg

    Greg Guest

    Hello,

    I am trying to do some junit testing of a process command. I need to mock out what the regular process command says to the java code. My junit writes to a file and then makes a windows alias to concatenate the file when thecommand is executed instead of executing the regular system command. It sets this value in the autorun variable in the registry. When I pull up a command prompt, it works. However, my java process execution is somehow still reading the system command. How do I get it to use my stuff? Any ideasor suggestions? All are welcome. Thank you.

    Greg
    Greg, Sep 28, 2012
    #1
    1. Advertising

  2. Greg

    bob smith Guest

    On Friday, September 28, 2012 11:49:36 AM UTC-5, Greg wrote:
    > Hello,
    >
    >
    >
    > I am trying to do some junit testing of a process command. I need to mock out what the regular process command says to the java code. My junit writes to a file and then makes a windows alias to concatenate the file when the command is executed instead of executing the regular system command. Itsets this value in the autorun variable in the registry. When I pull up acommand prompt, it works. However, my java process execution is somehow still reading the system command. How do I get it to use my stuff? Any ideas or suggestions? All are welcome. Thank you.
    >
    >
    >
    > Greg


    Are you talking about the command-line utility "ps"?
    bob smith, Oct 1, 2012
    #2
    1. Advertising

  3. Greg

    Lew Guest

    Greg wrote:
    > Hello,
    > I am trying to do some junit [sic] testing of a process command. I need to mock out what the regular process command says to the java [sic] code. My junit writes to a file and then makes a windows [sic] alias to concatenate the file when the command is executed instead of executing the regular system command.


    What is the "regular system command"?

    > It sets this value in the autorun variable in the registry. When I pull up a command prompt, it works.


    What value? What works?

    > However, my java process execution is somehow still reading the system command.


    What system command?

    What does the Java code say?

    http://sscce.org/

    > How do I get it to use my stuff? Any ideas or suggestions? All are welcome.



    Show us your stuff. Right now it's like we're the mechanic and you're asking us,
    "My car doesn't steer correctly. How do I get it to steer correctly?"

    Give us data. Tell us what you're talking about.

    Based on what you've said so far, I can diagnose your problem. Your Java code
    is not using the Windows Registry (for which 'Preferences' might help), andis
    directly invoking that mysterious, anonymous "regular process command". As a
    result it's doing precisely what you're asking it to do.

    So what are you asking it to do?

    --
    Lew
    Lew, Oct 1, 2012
    #3
  4. Greg

    Greg Guest

    Doskey is used for alias. I am using the net command to see what is running.

    Greg

    On Friday, September 28, 2012 9:49:36 AM UTC-7, Greg wrote:
    > Hello,
    >
    >
    >
    > I am trying to do some junit testing of a process command. I need to mock out what the regular process command says to the java code. My junit writes to a file and then makes a windows alias to concatenate the file when the command is executed instead of executing the regular system command. Itsets this value in the autorun variable in the registry. When I pull up acommand prompt, it works. However, my java process execution is somehow still reading the system command. How do I get it to use my stuff? Any ideas or suggestions? All are welcome. Thank you.
    >
    >
    >
    > Greg
    Greg, Oct 4, 2012
    #4
  5. Greg

    Greg Guest

    So here is my command: reg add "HKCU\Software\Microsoft\Command Processor\"/v AutoRun /t REG_SZ /d "doskey net=type %1$s"

    That command should cat using type my file.

    Greg

    On Wednesday, October 3, 2012 4:09:07 PM UTC-7, Greg wrote:
    > Doskey is used for alias. I am using the net command to see what is running.
    >
    >
    >
    > Greg
    >
    >
    >
    > On Friday, September 28, 2012 9:49:36 AM UTC-7, Greg wrote:
    >
    > > Hello,

    >
    > >

    >
    > >

    >
    > >

    >
    > > I am trying to do some junit testing of a process command. I need to mock out what the regular process command says to the java code. My junit writes to a file and then makes a windows alias to concatenate the file whenthe command is executed instead of executing the regular system command. It sets this value in the autorun variable in the registry. When I pull upa command prompt, it works. However, my java process execution is somehowstill reading the system command. How do I get it to use my stuff? Any ideas or suggestions? All are welcome. Thank you.

    >
    > >

    >
    > >

    >
    > >

    >
    > > Greg
    Greg, Oct 4, 2012
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Big-Dave

    Help with autorun.inf file.

    Big-Dave, Apr 7, 2004, in forum: HTML
    Replies:
    7
    Views:
    9,931
    Big-Dave
    Apr 8, 2004
  2. Replies:
    9
    Views:
    343
  3. M.E.Farmer

    Windows CD autorun program

    M.E.Farmer, Dec 19, 2004, in forum: Python
    Replies:
    0
    Views:
    391
    M.E.Farmer
    Dec 19, 2004
  4. =?Utf-8?B?bWF2cmlja18xMDE=?=

    Any one expert in Autorun.inf

    =?Utf-8?B?bWF2cmlja18xMDE=?=, Aug 24, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    306
    =?Utf-8?B?bWF2cmlja18xMDE=?=
    Aug 24, 2006
  5. Replies:
    6
    Views:
    323
Loading...

Share This Page