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
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" )
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 ( —-
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
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%"
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
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%.
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.
Search For Reg Key Containing String
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
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.
Restart Service On List Of Computers From Txt File
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
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.
How Do I Rename A File Using Clipboard Contents?
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/F Was Unexpected At This Time
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?
Delete Multiple Folders With Diffrent Paths Using Vbscript
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 SubHow To Ask Questions The Smart Way
Break Statement Is Not Within Loop Or Switch
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 lessBatch File To Extract Address From .Url File
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
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
Batch File To Delete Folders Less Than 3MB
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
See lessSet 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
Batch File Subnet Script
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
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:
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.
Where Can I Find Amipro To Download?
You can try here: http://vetusware.com
You can try here:
http://vetusware.com
See less