Search found 470 matches

by Liviu
06 Mar 2012 15:34
Forum: DOS Batch Forum
Topic: How to "RUN AS ADMINISTRATOR" from a *.bat script.
Replies: 4
Views: 7025

Re: How to "RUN AS ADMINISTRATOR" from a *.bat script.

"Run As Administrator" does its job WITHOUT needing a password, is it a totally different animal from RUNAS ? Yes, indeed. As confusing as MS chose to make UAC be, "run as administrator" does not mean "run under the administrator user account", but rather "run as ...
by Liviu
27 Feb 2012 00:18
Forum: DOS Batch Forum
Topic: Wait until application finished
Replies: 16
Views: 6761

Re: Wait until application finished

@alan_b: Well, my friend, I just call it xyz.exe, but it has another name, of course… in this case Passcrypt.exe, a password safe. As I wrote above, I DO want it to terminate the exe from the processes, when I close the program. It does in XP, but not in Win7. Don't have any first hand experience w...
by Liviu
24 Feb 2012 01:39
Forum: DOS Batch Forum
Topic: Wait until application finished
Replies: 16
Views: 6761

Re: Wait until application finished

Yes, it is the catch - it just continues waiting even though I terminate xyz.exe. How do you define "terminate" then? Some apps have a "minimize to systray instead of closing" configuration setting, which might be what you are seeing (and, in that case, all that's needed is turn...
by Liviu
24 Feb 2012 01:31
Forum: DOS Batch Forum
Topic: Batch file formatting, Diskpart formatting
Replies: 19
Views: 7786

Re: Batch file formatting, Diskpart formatting

Don't call it format.bat That's sound advice, of course. Yet, I still don't see what the "use case" is here, other than the OP admittedly formatted one of his own flash drives by mistake in the process Can't imagine anyone nowadays would run an unknown .bat file from an unknown stick, jus...
by Liviu
18 Feb 2012 15:19
Forum: DOS Batch Forum
Topic: How to QUICKLY merge two input files into one output file
Replies: 5
Views: 1770

Re: How to QUICKLY merge two input files into one output fil

At this topic you may read an extensive description of the problem about the growth of execution times with large number of environment variables that include a description of the cause of the problem and a possible method to solve this problem, in part at least. Interesting reading, thanks for the...
by Liviu
17 Feb 2012 23:54
Forum: DOS Batch Forum
Topic: redirection input
Replies: 16
Views: 4076

Re: redirection input

It is not a java problem!!!!!! the program works fine whitout an input redirection file (works fine if i enter the "q" key or "return" in the command line promt!!)!!! To repeat my previous question, what happens if you type in Ctrl-Z at the interactive prompt? I repeat my questi...
by Liviu
17 Feb 2012 16:15
Forum: DOS Batch Forum
Topic: using echo to enter text in a file and carriage return
Replies: 21
Views: 7811

Re: using echo to enter text in a file and carriage return

ok, one last stab at it. You make this more complicated than it needs be. There seem to be two separate issues at play here, and it'd be easier to deal with them one at a time. 1. There is a text file to be emailed (and it doesn't matter whether the text file was created from the batch or any other...
by Liviu
16 Feb 2012 21:52
Forum: DOS Batch Forum
Topic: using echo to enter text in a file and carriage return
Replies: 21
Views: 7811

Re: using echo to enter text in a file and carriage return

It would seem to be a problem when processing text in his email utility. Right. Looks to me like some "clever" attempt on the part of the email utility to un-wrap lines based on a (rather arbitrary) rule of if-previous-line-ends-with-a-space-then-consider-this-line-a-continuation. Besides...
by Liviu
16 Feb 2012 21:40
Forum: DOS Batch Forum
Topic: How to QUICKLY merge two input files into one output file
Replies: 5
Views: 1770

Re: How to QUICKLY merge two input files into one output fil

I dislike the exponential growth of execution time as the size of the array V_nnnnnn increases. There is no obvious quadratic factor in the code you posted. It's possible that just accessing the variable may take linear time with the total number of variables defined, though I was not curious enoug...
by Liviu
16 Feb 2012 11:47
Forum: DOS Batch Forum
Topic: redirection input
Replies: 16
Views: 4076

Re: redirection input

This is my program (simplified), it is written in java... ... My question is... is there a way (with a batch file) to read input file interactively? ... When i call the program with myprogram.exe<nul, the loop executes only once.... Presumably, this means the program stops when the input stream is ...
by Liviu
16 Feb 2012 11:38
Forum: DOS Batch Forum
Topic: using echo to enter text in a file and carriage return
Replies: 21
Views: 7811

Re: using echo to enter text in a file and carriage return

Sorry, but I don't see it happening here. --------- findstr /C:"something" somefile.log if %errorlevel%==0 ( Echo text exists>>myfile.txt ) else ( Echo text does not exist>>myfile.txt ) echo checks complete>>myfile.txt Text file when viewed in notepad: text exists checks complete when the ...
by Liviu
16 Feb 2012 11:04
Forum: DOS Batch Forum
Topic: using echo to enter text in a file and carriage return
Replies: 21
Views: 7811

Re: using echo to enter text in a file and carriage return

Text sent to a file during normal "Echo" has ".." or "0D 0A" (CR/LF) Text sent directly after using findstr has " .." or "20 0D 0A" (space CR/LF) Can't relate this to your previous code directly. But in case it matters, note that the 'echo' line car...
by Liviu
16 Feb 2012 10:41
Forum: DOS Batch Forum
Topic: redirection input
Replies: 16
Views: 4076

Re: redirection input

No bugs in my code... the program works fine if i call it normally from the command prompt with c:\>myprogram.exe and pass the input parameters whne required... the program terminate only if i insert the "q" char . What happens if you type-in Ctrl-Z interactively? What happens if you run ...
by Liviu
15 Feb 2012 19:34
Forum: DOS Batch Forum
Topic: How to preserve an exclamation mark in User's Free Text
Replies: 7
Views: 2541

Re: How to preserve an exclamation mark in User's Free Text

alan_b wrote:If that works then there could be a future maintenance problem if the sequence sorting should need 7 digit numbers, in which case !LN:~16! might need changing to !LN:~18!

Maybe !LN:*]=! then?

Liviu
by Liviu
15 Feb 2012 19:27
Forum: DOS Batch Forum
Topic: foolproof counting of arguments
Replies: 56
Views: 43304

Re: foolproof counting of arguments

Redirection is one wacky world I haven't fully analyzed the results to arrive at a pattern yet. But here are some interesting test cases with results. Interesting... Though I'd say first pattern which jumps to the eye is random chaos Not directly related, but another >&3 odd behavior noted in m...