Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Process command and autorun variable (http://www.velocityreviews.com/forums/t952804-process-command-and-autorun-variable.html)

Greg 09-28-2012 04:49 PM

Process command and autorun variable
 
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

bob smith 10-01-2012 08:41 PM

Re: Process command and autorun variable
 
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"?

Lew 10-01-2012 09:04 PM

Re: Process command and autorun variable
 
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

Greg 10-03-2012 11:09 PM

Re: Process command and autorun variable
 
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 10-03-2012 11:11 PM

Re: Process command and autorun variable
 
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



All times are GMT. The time now is 07:46 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.