1. Maybe something like this:for %%a in ("HKLM" "HKCU" "HKCR" "HKU" "HKCC") do ( 2>nul reg query %%a /s | find /v " " | find /i "wanted string" | find /v /i "unwanted string" ) Remove any unneeded hive roots to taste, or add subkeysto narrow the search.Remove /i switches to the find commands for a cRead more

    Maybe something like this:

    for %%a in ("HKLM" "HKCU" "HKCR" "HKU" "HKCC") do (
        2>nul reg query %%a /s | find /v "    " | find /i "wanted string" | find /v /i "unwanted string"
    )
    

    Remove any unneeded hive roots to taste, or add subkeys
    to narrow the search.

    Remove /i switches to the find commands for a case sensitive search.

    See less
    • 0
  2. Hello,If you are looking for an easy solution for WinXP/2003 through Win8/2012 that has not external dependencies, like enabling PowerShell script execution or installing/copy program files, then using the CMD.EXE prompt's FOR command is the best bet.:: A one line batch file for /F %%i in (computerlRead more

    Hello,
    If you are looking for an easy solution for WinXP/2003 through Win8/2012 that has not external dependencies, like enabling PowerShell script execution or installing/copy program files, then using the CMD.EXE prompt’s FOR command is the best bet.

    :: A one line batch file 
    for /F %%i in (computerlist.txt) do ( @sc \\%%i stop "SERVICE NAME" )
    
    :: Same one liner but direct at command prompt
    for /F %i in (computerlist.txt) do ( @sc \\%i stop "SERVICE NAME" ) 

    See less

    • 0
  3. for /f "skip=1 tokens=*" %%i in (sn2.txt) do move /y sn2.txt "%%i.txt"

    for /f “skip=1 tokens=*” %%i in (sn2.txt) do move /y sn2.txt “%%i.txt”

    See less
    • 0
  4. Let's do a little bit of spell checking.----for F/ "delims=+" %%y in (%tmp_keyword_file) DO (----Does that look right to you?Can I put a question here?

    Let’s do a little bit of spell checking.

    —-
    for F/ “delims=+” %%y in (%tmp_keyword_file) DO (
    —-

    Does that look right to you?

    Can I put a question here?

    See less
    • 0
  5. Set fso = CreateObject("Scripting.FileSystemObject") 'Get paths to the shell's folders With CreateObject("WScript.Shell") startMenu = .SpecialFolders("StartMenu") allStartMenu = .SpecialFolders("AllUsersStartMenu") desktop = .SpecialFolders("Desktop") allDesktop = .SpecialFolders("AllUsersDesktop")Read more

    Set fso = CreateObject("Scripting.FileSystemObject")
    'Get paths to the shell's folders
    With CreateObject("WScript.Shell") 
      startMenu = .SpecialFolders("StartMenu")
      allStartMenu = .SpecialFolders("AllUsersStartMenu")
      desktop = .SpecialFolders("Desktop")
      allDesktop = .SpecialFolders("AllUsersDesktop")
    End With
    'WScript.Shell doesn't provide the Program Files directory; asking Explorer
    With CreateObject("Shell.Application") 'Reference: ShlObj.h
      progFiles = .Namespace(&H26;).Self.Path 'CSIDL_PROGRAM_FILES
      On Error Resume Next 'Mapping might not appear before Vista
        progFilesx86 = .Namespace(&H2A;).Self.Path 'CSIDL_PROGRAM_FILESX86
      On Error Goto 0
    End With
    
    Del "c:\test1"
    Del fso.BuildPath(progFiles, "test2")
    If Len(progFilesx86) > 0 Then _
      Del fso.BuildPath(progFilesx86, "test2")
    Del fso.BuildPath(startMenu, "a start menu shortcut")
    Del fso.BuildPath(allStartMenu, "a start menu shortcut")
    Del fso.BuildPath(desktop, "a desktop shortcut")
    Del fso.BuildPath(allDesktop, "a desktop shortcut")
    WScript.Quit
    
    Sub Del(sPath)
      If fso.FolderExists(sPath) Then _
        fso.DeleteFolder sPath, True
      If fso.FileExists(sPath) Then _
        fso.DeleteFile sPath, True
    End Sub

    How To Ask Questions The Smart Way

    See less
    • 0
  6. The semi-colon at the end of the second "for" statement is an error as it produces an empty "for" loop.

    The semi-colon at the end of the second “for” statement is an error as it produces an empty “for” loop.

    See less
    • 0
  7. Mechanix2Go: Post your file.He lives!Untested and I've been drinking:@for /f "delims=" %%a in ('findstr /b "URL=" "%~1"') do @set %%a @START "" "%LOCALAPPDATA%\Google\Chrome\Application\chrome.exe" --new-tab-page-1 "%URL%"How To Ask Questions The Smart Way

    Mechanix2Go: Post your file.
    He lives!

    Untested and I’ve been drinking:

    @for /f "delims=" %%a in ('findstr /b "URL=" "%~1"') do @set %%a
    @START "" "%LOCALAPPDATA%\Google\Chrome\Application\chrome.exe" --new-tab-page-1 "%URL%"

    How To Ask Questions The Smart Way

    See less
    • 0
  8. Hi Ghost29, I had the same problem and mamnged to find some code that I modified to do the job. It needs to be pasted into a text editor and saved as something like DELETE.vbs. It can be rin run in a .bat file using the following command line: wscript.exe DELETE.vbs Dim objFD Set objFD = CreateObjecRead more

    Hi Ghost29,
    I had the same problem and mamnged to find some code that I modified to do the job. It needs to be pasted into a text editor and saved as something like DELETE.vbs. It can be rin run in a .bat file using the following command line:

    wscript.exe DELETE.vbs

    Dim objFD
    Set objFD = CreateObject(“Scripting.FileSystemObject”)
    Set objSelectedFolder = objFD.GetFolder(“path to iTunes Folder”)
    Set colSubfolders = objSelectedFolder.SubFolders
    For Each objSubfolder In colSubfolders
    If objSubfolder.Size < 3000000 Then
    objSubfolder.Delete True
    End If
    Next

    See less
    • 0
  9. Nope. Just double click the Subnet.Script.bat. I made it interactive, where Subnet.Script will call the other needed routines automatically, assuming the .bat files were placed in a folder found in your %path%. Here's what my %path% looks like:C:\>echo %path% C:\WINDOWS\system32;C:\WINDOWS;C:\WINRead more

    Nope. Just double click the Subnet.Script.bat. I made it
    interactive, where Subnet.Script will call the other needed
    routines automatically, assuming the .bat files were placed in
    a folder found in your %path%.

    Here’s what my %path% looks like:

    C:\>echo %path%
    C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;C:\Program Files\C
    ommon Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Teleca Shared;c:\path;\\DL380-
    SERVER\LAN Path;\\DL380-SERVER\LAN Path\exes
    

    Most of my stuff is stored in “\\DL380-SERVER\LAN Path” and “\\DL380-SERVER\LAN Path\exes”, with a couple of
    “local” .bats stored in “c:\path”, folders I created myself.

    See less
    • 0