Search found 5 matches

by Rubl7
27 May 2013 06:50
Forum: DOS Batch Forum
Topic: How-to hide error output from Reg Query command?
Replies: 7
Views: 15505

Re: How-to hide error output from Reg Query command?

That does hide the error output. But it also does not forward the findings in the Reg Query and paste it into the "del.txt" file. Which means that the "del.txt" file will always be empty :(

Guess it just dumps the Reg Query findings in a black hole and then create an empty file.
by Rubl7
27 May 2013 05:55
Forum: DOS Batch Forum
Topic: How-to hide error output from Reg Query command?
Replies: 7
Views: 15505

Re: How-to hide error output from Reg Query command?

nono.. it is this line that causes the issue, if the mentioned registry path does not exist: reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Code Store Database\Distribution Units" /f "Java Runtime Environment" /s | find "HKEY_LOCAL_MACHINE" > del.txt The n...
by Rubl7
27 May 2013 04:41
Forum: DOS Batch Forum
Topic: How-to hide error output from Reg Query command?
Replies: 7
Views: 15505

How-to hide error output from Reg Query command?

Hi fellow batches, I am trying to hide the error output from the Reg Query command, if a registry entry do not exist. Normally I would just add the command "nul 2>&1" to hide any output the command will give. But if I add this to the first line that generates the error message in case ...
by Rubl7
10 Mar 2013 06:40
Forum: DOS Batch Forum
Topic: Batch file - Run as administrator, if not delete batch file?
Replies: 1
Views: 3018

Batch file - Run as administrator, if not delete batch file?

Hi I have made a batch file which I need to run as administrator. For that purpose I use this script, But what I want, is if the user choose not to run as administrator (click NO to UAC), then the program will exit, and the batch will delete it selves automatically. The command for the batch file to...