Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Process command and autorun variable

Reply
Thread Tools

Process command and autorun variable

 
 
Greg
Guest
Posts: n/a
 
      09-28-2012
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
 
Reply With Quote
 
 
 
 
bob smith
Guest
Posts: n/a
 
      10-01-2012
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"?
 
Reply With Quote
 
 
 
 
Lew
Guest
Posts: n/a
 
      10-01-2012
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
 
Reply With Quote
 
Greg
Guest
Posts: n/a
 
      10-03-2012
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


 
Reply With Quote
 
Greg
Guest
Posts: n/a
 
      10-03-2012
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autorun inf and recycler virus help darfun Computer Information 0 09-27-2010 06:08 PM
Autorun and media cards Watcher of the Skies Computer Support 1 04-22-2007 11:57 AM
Help with autorun.inf file. Big-Dave HTML 7 04-07-2004 11:52 PM
Autorun wntw Computer Support 1 11-16-2003 11:39 AM
restoring autorun in xp al Computer Support 5 09-13-2003 03:29 PM



Advertisments