Jump to content

Wireless

Member
  • Posts

    10
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Posts posted by Wireless

  1. This should help:

    For /F %%A in ('Attrib /S "%USERPROFILE%\Local Settings\Temporary Internet Files\*" ^| Find /C /V "File not found - "') Do Echo IE Temp Files: %%A
    For /F "Tokens=3" %%A in ('Reg Query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Content" /v CacheLimit') Do Set /A IECacheSize=%%A / 1024
    Echo IE Cache Size: %IECacheSize% MB
    For /F %%A in ('Attrib /S %SYSTEMROOT%\Prefetch\*.pf ^| Find /C /V "File not found - "') Do Echo Windows Prefetch Files: %%A

  2. The REN and ECHO lines need to be in parenthesis because they are both part of the DO loop. Enclosing lines in parenthesis like that is a way of executing multiple lines of code using commands like IF and DO. An alternative way is to us the '&' character to separate multiple commands like...

    FOR /F "TOKENS=1,2 DELIMS=-" %%I IN ('DIR /B WINDOWSXP-KB*.EXE') DO REN %%I-%%J*.EXE %%J.EXE & ECHO %CMD% %SOURCE%%%J.EXE %INT%%PATH% >> EXPORT.TXT

    This must all be on one line. This way makes the code harder for someone else to read (if that matters) but it works all the same.

  3. This should get you started. It will rename the hotfixes that are in the %SOURCE% directory and output a list to export.txt in your format.

    SET CMD=START /WAIT
    SET INT=/Q -INTEGRATE:
    SET SOURCE=H:\UPDATES\
    SET PATH=H:\XPCD\

    del export.txt 2>nul

    for /f "tokens=1,2 delims=-" %%I in ('dir /b %SOURCE%\windowsxp-kb*.exe') do (
       ren %SOURCE%%%I-%%J*.EXE %%J.EXE
       echo %CMD% %SOURCE%%%J.EXE %INT%%PATH%>>export.txt
    )

  4. Look at

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

    and verify that Path is type REG_EXPAND_SZ. If it's not, it needs to be so delete Path and create a new expandable string value called Path and enter your path. Logoff or reboot to see change take effect.

×
×
  • Create New...