Search found 13 matches
- 21 Sep 2016 14:17
- Forum: DOS Batch Forum
- Topic: Issue with running Sysinternals PSKill from a batch file
- Replies: 7
- Views: 7402
Re: Issue with running Sysinternals PSKill from a batch file
I had tried it with and without quotes. I'm trying to make it accommodating towards different environments. I've got it working well on XP through 7 so far.
- 21 Sep 2016 14:01
- Forum: DOS Batch Forum
- Topic: Issue with running Sysinternals PSKill from a batch file
- Replies: 7
- Views: 7402
Re: Issue with running Sysinternals PSKill from a batch file
SET TK=%temp%\toolkit "%TK%\tools\pskill.exe" -t -nobanner %%F I've already got it set to use a full path. I can copy the echoed command from the command prompt, repaste it, and it runs fine. Adding "call " before the command did the trick. I wish I knew why that worked...
- 21 Sep 2016 13:22
- Forum: DOS Batch Forum
- Topic: Issue with running Sysinternals PSKill from a batch file
- Replies: 7
- Views: 7402
Re: Issue with running Sysinternals PSKill from a batch file
The first batch file I posted is named "t2.cmd". The second is "bootstrap-new.cmd" I've moved all other files to a subfolder, right now the folder with the script has (besides those two batch files): msvc.txt php.txt scratch2.txt chrome profile.7z FOLDER chrome FOLDER misc The to...
- 21 Sep 2016 12:31
- Forum: DOS Batch Forum
- Topic: Issue with running Sysinternals PSKill from a batch file
- Replies: 7
- Views: 7402
Issue with running Sysinternals PSKill from a batch file
I'm having some real problems trying to run pskill. What I'm trying to do is kill every process on the computer that comes from chrome.exe in a certain folder. I don't want to kill every chrome.exe process, because the one I am targeting is a portable copy. Batch for testing this code: m Full batch:...
- 30 Sep 2011 12:29
- Forum: DOS Batch Forum
- Topic: Need some minor help perfecting this batch registry query
- Replies: 1
- Views: 3126
Need some minor help perfecting this batch registry query
Output of REG QUERY "HKLM\Software\1234567890\123\WinPE\BoundOperatingSystem\HKEY_USERS" /f S-1-5*-1000 /d HKEY_LOCAL_MACHINE\Software\1234567890\123\WinPE\BoundOperatingSystem\HKEY_USERS S-1-5-21-974480208-2472847273-1695335269-1000 REG_SZ S-1-5-21-974480208-2472847273-1695335269-1000 S-1...
- 31 Mar 2011 10:29
- Forum: DOS Batch Forum
- Topic: Oddball: Need to make a string of "=" that changes...
- Replies: 2
- Views: 6914
Re: Oddball: Need to make a string of "=" that changes...
Very good! I had to add one more "=" to the long one, it was coming up one short, other than that works great. No idea how that works (I think for any advanced batch scripting I would have to use PHP).
- 30 Mar 2011 16:52
- Forum: DOS Batch Forum
- Topic: Oddball: Need to make a string of "=" that changes...
- Replies: 2
- Views: 6914
Oddball: Need to make a string of "=" that changes...
I've got a batch file that I use for formatting a log file (made from a batch file that uses wget to download the latest copies of a bunch of software). rem @echo off if "%1" == "" goto error if "%1" == "sec" goto sec if "%1" == "pro" goto ...
- 14 Dec 2010 15:08
- Forum: DOS Batch Forum
- Topic: Help with shutdown abort script
- Replies: 11
- Views: 14136
Re: Help with shutdown abort script
Try this: @echo off :start shutdown -a 2>nul &&echo shutdown was aborted goto start 2>nul eliminates outputting of error messages by redirecting to NUL && associates the following command if the previous command was successful (errorlevel 0) Regards aGerman I tried yours (since it w...
- 14 Dec 2010 12:58
- Forum: DOS Batch Forum
- Topic: Help with shutdown abort script
- Replies: 11
- Views: 14136
Help with shutdown abort script
Sometimes, I update a program that wants to restart the computer, or a program wants to force a restart for some reason, and I want to leave the computer on. I was able to make a script to run "shutdown -a" (abort) constantly, but I would like to take it one step further. :start shutdown -...
- 19 May 2010 13:52
- Forum: DOS Batch Forum
- Topic: FOR command assistance: Setting variable from command output
- Replies: 7
- Views: 9440
Re: FOR command assistance: Setting variable from command ou
Little problem, Vista doesn't output the same format for the netsh int ip show interface. E:\>netsh int ip show interfaces Idx Met MTU State Name --- --- ----- ----------- ------------------- 1 50 4294967295 connected Loopback Pseudo-Interface 1 11 25 1500 connected Wireless Network Connection 8 30 ...
- 18 May 2010 23:11
- Forum: DOS Batch Forum
- Topic: FOR command assistance: Setting variable from command output
- Replies: 7
- Views: 9440
Re: FOR command assistance: Setting variable from command ou
You can change registry keys using the REG ADD command. But I'm not familar with that internet stuff. I know that it should be something at HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Internet Settings but you have to assist me which keys / values have to be changed. BTW I'm no...
- 18 May 2010 12:50
- Forum: DOS Batch Forum
- Topic: FOR command assistance: Setting variable from command output
- Replies: 7
- Views: 9440
Re: FOR command assistance: Setting variable from command ou
I didn't test it, but try something like that: REM ##find the line beginning with "User-friendly Name:" and set the value behind the colon to %%B FOR /F "tokens=1* delims=:" %%A IN ('netsh int ip show interface^|findstr /b /i /c:"User-friendly Name:"') DO ( REM ##trim ...
- 17 May 2010 15:33
- Forum: DOS Batch Forum
- Topic: FOR command assistance: Setting variable from command output
- Replies: 7
- Views: 9440
FOR command assistance: Setting variable from command output
I've got a tricky one (for me). I'm trying to create a batch file which will reset all the network interfaces on the computer to DHCP. Setting a single interface to DHCP isn't an issue (see m for exact commands), but I want to set all the interfaces to DHCP (some viruses set bad IP addresses or DNS ...