Jump to content

sWeed

Members
  • Posts

    3
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

sWeed's Achievements

Newbie

Newbie (1/14)

  1. Quite hard to answer your question What about asking the registry... if autorun is enabled/disabled.. REG QUERY ..... http://www.samlogic.net/articles/autorun-enable-disable-nodrivetypeautorun.htm Give some more infos about your actions you want to execute...
  2. Quick and Dirty Solution for Windows Clean_Win_Reg.cmd @echo off setlocal enableextensions enabledelayedexpansion # Nr of lines deleting from Registry set len=3 set /a len_pos=%len%-1 # Get the MRUList from Registry and save it to %mru% for /f "tokens=2*" %%a in ('reg query HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU /v MRUList') do set "mru=%%b" # Count chars for /f %%c in ('cmd /u /v /q /c"(echo(!mru!)" ^| find /v "" ^| findstr /r /c:"[a-z]" ^| find /c /v ""') do set "str_len=%%c" # Get the last Nr of defined lines from MRUList set list=!mru:~0,%len%! # Set the new MRUList set original_list=!mru:~%len%,%str_len%! # Delete old MRUList reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU" /v MRUList /f # Add new MRUList reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU" /v MRUList /t Reg_Sz /d %original_list% # Delete the last Nr of lines from Registry for /l %%d in (0,1,%len_pos%) do (reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU /v !list:~%%d,1! /f) PS: You have to take the REG DELETE "Path" in double Quotes QUACK STRING reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU" /va /f
×
×
  • Create New...