midiboy Posted October 24, 2007 Author Posted October 24, 2007 Hi gunsmokingman,again, thanks a lot ! How come you know all those commands ? Is there a magic book where you look these things up or do you simply know them ? Bye and have a nice day !Alex
midiboy Posted July 27, 2008 Author Posted July 27, 2008 (edited) Hi Yzöwl,I have been using your code successfully for months now:for /f "delims=" %%? in ('net config work^|findstr/i "\<soft"') do call :OSis %%?if %WinOS% == Vista goto :Vistaif %WinOS% == XP goto :XP:OSisecho/%*|find "2000">nul 2>&1&&(set "WinOS=XP"&goto :eof)echo/%*|find "2002">nul 2>&1&&(set "WinOS=XP"&goto :eof)echo/%*|find "2003">nul 2>&1&&(set "WinOS=XP"&goto :eof)echo/%*|find "Vista">nul 2>&1&&(set "WinOS=Vista"&goto :eof)echo/%*|find "2008">nul 2>&1&&(set "WinOS=Vista"&goto :eof)Thanks again for it ! :-)However, recently I am having a problem with this code on WinXP SP3 during runonceex. Seemingly out of nowhere the cmd stops right after this command:for /f "delims=" %%? in ('net config work^|findstr/i "\<soft"') do call :OSis %%?This does not happen on all the scripts where this code is present, just one. The strange thing is, if I press the ENTER key, it continues to run normally, no error appears, nothing. But it just stops there forever if noone presses a key.Do you maybe have an explanation for it or a way around it ?Thanks in advance,Alex Edited July 27, 2008 by midiboy
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now