Code: for /f "tokens=2,3,4,5,6,7 delims= " %%a in ('wmic os get caption') do set ver=%%a %%b %%c %%d %%e %%f Something's wrong with this. It should set a variable "ver", but in my test I got "_er" or even "__r" (_ indicating a blank). Reducing to Code: for /f "tokens=2,3,4,5 delims= " %%a in ('wmic os get caption') do set ver=%%a %%b %%c %%d seems to work, but does it work everywhere?
Hmm, first version is working for me, tested on new Home Basic install. Theming in installkey.bat was only a test, not part of Duality so far. Second try: View attachment 22430
Co-Developers section first post updated chnix gets Co-Developers status Adjusted order in reflection of discovery, original ideas, code development, thread starting and testing...
Tested on Pro again, script is backing up the theme and restoring it while rearming. On Home Basic it is backing up the wallpaper and restores it properly after rearm + log off.
If you execute the command from #698 in a command line, it succeeds. But why does it mess up the list you get with 'set'? Could it be you captured a few non-printables?
No one listens to me ...lol Rearm Folder Concept hence one rearm folder Been posting Rearm folder stuff for like 10 posts... No one responds? Why? How bout before we do something we describe what we're doing like I wanted one rearm folder and described it like many times ....lol Then we don't have to play catchup or ask what changed Better communication = better batch file
ATM i´m only working on Check.bat, to get it properly working on various versions. In case it will, i only need to implement the changes in latest Duality from dropbox, so all changes should come together. That way i do not need to touch other stuff.
Code: for /f "tokens=2,3,4,5,6,7 delims= " %a in ('wmic os get caption') do set ver=%a %b %c %d %e %f If you type that in a command line, and use 'set' afterwards to view it, the list is messed up. It doesn't show 'ver=blah' but ' er=blah' or even ' r=blah'.
Using it together with the little loop: Code: for /f "tokens=2,3,4,5,6,7 delims= " %%a in ('wmic os get caption') do set ver=%%a %%b %%c %%d %%e %%f :loopV if "%ver:~-1%"==" " set "ver=%ver:~0,-1%" & goto :loopV That way any spaces at the end are cutted. EDIT: Not shure what 'set' command line you mean. Better show me .
Try this instead, No loop required and it only puts out Ultimate as the editions instead of Windows 7 Ultimate. Removed extra ,5,6,7 and the a% etc Code: for /f "tokens=2,3,4 delims= " %a in ('wmic os get caption') do set ver=%c