And I need to get 000A270018E6ED40 which should always be located between the \ and the & (at least I hope so)! Right now it needs to be a DOS command, but if you have it in an easier way, feel free to post, I could switch later, but now PLEASE in DOS-commands. I hope it`s not impossible, since it is necessary for ml_iPod! Thanks anyway
Mh, you could also just cut off the characters before and after the string! This would actually be more helpful, since I need it for a second txt and in there the structure is different!
It works when I use it from cmd, but when I write it into my batch, it doesn't. So right now it looks like this: REGEDIT /E c:\fwid.txt HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Disk\Enum find /I "iPod" c:\fwid.txt > c:\apple.txt del C:\fwid.txt FOR /F "tokens=6 delims=\^&" %a IN (C:\apple.TXT) DO @ECHO %a >> C:\file.txt
Oh, I didn't know this thank you very much! Now I have a second question, for the iPod Touch, the registry string is different, so the code from above doesn't work.The txt looks like that (without the first and last "): " ---------- C:\FWID.TXT "1"="USB\\\\Vid_05ac&Pid_1290\\\\5299c8e84b07acce79299f9a83ed8806cb3800a8"" What I need are the first 16 characters after the \\\\, so in this case 5299c8e84b07acce . Is that possible? Oh and it is not necessarily a 1290 it can also be a 1291 before the \\\\
Hm somehow it doesn't work, this is my code right now (I had to double the last couple %: @echo off REGEDIT /E c:\fwid.txt HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBAAPL\Enum find /I "Vid_05ac" c:\fwid.txt > c:\apple.txt del C:\fwid.txt for /f "tokens=3 delims=\\\\" %%a in (C:\apple.txt) do (set _=%%a) for /f "tokens=*" %%a in ('echo %%_%%') do (set _=%%_:~0,16%%) echo %%_%% Pause
I didn't get anything! The txt is an empty line and then: ---------- C:\FWID.TXT "1"="USB\\\\Vid_05ac&Pid_1290\\\\5299c8e84b07acce79299f9a83ed8806cb3800a8"
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE