Search found 9 matches

by Chonn
12 May 2009 12:18
Forum: DOS Batch Forum
Topic: cmd and reg
Replies: 2
Views: 5705

that works! SWEET!

Thank you very much!

Chonn
-rock on
by Chonn
11 May 2009 19:20
Forum: DOS Batch Forum
Topic: cmd and reg
Replies: 2
Views: 5705

cmd and reg

Hi again, I'm trying to export a registry key and then trying to get the data in a for loop with a .cmd file. But for some reason it is not looping through. Is there data in the reg file that prevents loop processing? My final goal is to export the hklm\software\microsoft\windows\currentversion\run ...
by Chonn
05 May 2009 16:44
Forum: DOS Batch Forum
Topic: for loop and function calls?
Replies: 7
Views: 10560

Thank you RElliott63 that helps I came up with this solution. And I can add functions as it develops. Thank you all for your help. I greatly appreciate it. I knew this was going to be a good site! Chonn @set ELEVEL=%ERRORLEVEL% :FUNCTIONCALLS ::====================================== For /D %%F in (F...
by Chonn
05 May 2009 12:39
Forum: DOS Batch Forum
Topic: for loop and function calls?
Replies: 7
Views: 10560

Here is the latest code snippet. the errorlevel is still not working right inside the for loop even with the "IF ERRORLEVEL" change. Thoughts? Improvements? :FUNCTIONCALLS ::====================================== For /D %%F in (FuncConfig funclog) Do ( Call :%%F echo %errorlevel% If errorl...
by Chonn
04 May 2009 14:16
Forum: DOS Batch Forum
Topic: for loop and function calls?
Replies: 7
Views: 10560

Thank you. That's working. However, the error code from a function call is not returning it so that it can exit. Thoughts?

I echoed the error level in the function and it echos that there is a 1 and not 0. But when it returns to the For loop the error is not passed back.

Thanks ahead of time.
by Chonn
01 May 2009 16:17
Forum: DOS Batch Forum
Topic: for loop and function calls?
Replies: 7
Views: 10560

for loop and function calls?

Hi guys, I'm looking to loop to some function calls as well as check the error level after returning from the function call. Right now I have this (archaic - I know - but that's why I'm here ) call :funcconfig @ IF %ERRORLEVEL% GTR 0 GOTO :EXIT @ call :funclog @ IF %ERRORLEVEL% GTR 0 GOTO :EXIT @ ca...
by Chonn
17 Mar 2009 16:21
Forum: DOS Batch Forum
Topic: ver in batch file
Replies: 3
Views: 6390

I found what I was looking for through a co-worker. Just for future reference and to help others here was my solution. %echo_cmd% ver | findstr -c:" 5.1." > NUL: && set OSVER=WINXP %echo_cmd% ver | findstr -c:" 5.2." > NUL: && set OSVER=WIN2K3 %echo_cmd% ver | fin...
by Chonn
17 Mar 2009 15:30
Forum: DOS Batch Forum
Topic: ver in batch file
Replies: 3
Views: 6390

I'm trying to run some commands that are OS specific (netsh firewall commands for 2003 and 2008) and I need to do some logic ahead of time to determine what my OS is. I will be using this file on other OSes (win7) at a later date so I need to set up the logic correctly now.

Thanks!

Chonn
by Chonn
17 Mar 2009 13:17
Forum: DOS Batch Forum
Topic: ver in batch file
Replies: 3
Views: 6390

ver in batch file

I'm so glad I found this site! Thanks ahead of time for your help.

I'm looking to get the ver command to work in a batch file.

I have tried %ver% and a few others but it's not working like %date% does.

Any help is greatly appreciated!

Chonn