Search found 60 matches

by Docfxit
16 May 2020 19:13
Forum: DOS Batch Forum
Topic: Unlocker
Replies: 6
Views: 276

Re: Unlocker

Based on my tests, it seems that you need the -option format instead of the /option format for flags. unlocker.exe "list_of_files.txt" -L -S -D -O deleted the files listed and created an output log You are a miracle worker. That works perfect. I tried dashes before. I must have not had the correct ...
by Docfxit
16 May 2020 15:03
Forum: DOS Batch Forum
Topic: Unlocker
Replies: 6
Views: 276

Re: Unlocker

Based on the picture you've shown, you need the /S option to hide the GUI, and the file containing the files to unlock goes after the /L option. unlocker.exe /L UnlockerListofFiles.txt /O /D /S Great observation. I still couldn't get it to delete the files/partition. The next thing I tried was: C:\...
by Docfxit
16 May 2020 11:03
Forum: DOS Batch Forum
Topic: Unlocker
Replies: 6
Views: 276

Re: Unlocker

Thank you for the suggestion... I modified your code a little to prove it was working as expected: for /f "delims=" %%f in ("UnlockerListofFiles.txt") do ( Echo "%%~f" C:\Programs\Unlocker\Unlocker.exe "%%~f" ) In the cmd window this is what I got: C:\Programs\Unlocker>for /F "delims=" %f in ("Unloc...
by Docfxit
13 May 2020 11:42
Forum: DOS Batch Forum
Topic: Unlocker
Replies: 6
Views: 276

Unlocker

I would like to get Unlocker working. My preference would be to get Unlocker to delete files from a list of files that are written to a file. I can't seem to get Unlocker working from a batch file no matter what command line parameters I give it. In these examples none of them work when I start the ...
by Docfxit
06 Apr 2020 10:48
Forum: DOS Batch Forum
Topic: Run PSEXEC
Replies: 9
Views: 1197

Re: Run PSEXEC

The code isn't broken, you just never gave it the PID to search for. As written, the script expects two arguments: the application name as it appears in tasklist and the PID of the running task, in that order. I'm trying to figure out if the program is running. I found the original way I was doing ...
by Docfxit
05 Apr 2020 19:39
Forum: DOS Batch Forum
Topic: Run PSEXEC
Replies: 9
Views: 1197

Re: Run PSEXEC

When I run this bat file: @Echo On setlocal enableDelayedExpansion set "cmd=tasklist.exe /fi "imagename eq UpdateMacrium.exe" /FI "IMAGENAME eq %1" /FI "PID eq %2"" for /F "delims=*" %%p in ('!cmd! ^| findstr "%2" ') do ( echo Task Found taskkill /f /im UpdateMacrium.exe ) This is what is produced i...
by Docfxit
04 Apr 2020 20:37
Forum: DOS Batch Forum
Topic: Run PSEXEC
Replies: 9
Views: 1197

Re: Run PSEXEC

Hi Steffen, You are 100% correct. I didn't catch that it wasn't writing the code to the run.bat file. I am not good with writing .bat scripts. I'm trying to learn. Now that you showed me how to correct the code Should I change the post above or should I create a new post with the correct code below?...
by Docfxit
03 Apr 2020 12:23
Forum: DOS Batch Forum
Topic: Run PSEXEC
Replies: 9
Views: 1197

Re: Run PSEXEC

There seem to be a couple of un-escaped characters in your echo commands E.g. the red marked here: Echo: tasklist /fi "imagename eq UpdateMacrium.exe" 2 > NUL | find /I /N "no tasks are running" > NUL Did you ever try to create the file locally in order to investigate what script content is written...
by Docfxit
02 Apr 2020 12:35
Forum: DOS Batch Forum
Topic: Run PSEXEC
Replies: 9
Views: 1197

Run PSEXEC

I would like to run a program on a remote PC. I'm signed on to PC#1 at 192.168.168.7 with a user that has admin rights. I would like to run the program on my LAN on PC#2 at 192.168.168.9. The same user is on this PC with admin rights and the same password. I'm running a bat file that creates another...
by Docfxit
10 Feb 2020 16:25
Forum: DOS Batch Forum
Topic: How to create a For loop to execute lines in the same .bat file
Replies: 6
Views: 4392

Re: How to create a For loop to execute lines in the same .bat file

I wasn't clear. I removed all other lines in the For loop to make it simpler. I really have a lot of entries in the For loop. The /V "C:\\Windows\\system32\\SCHelp.dll" only belongs to one of the lines. for %%k in ( "HKLM\SOFTWARE\Rainmaker Research" "HKCR\.1sc" "HKCR\.2sc" "HKCR\.3sc" "HKCR\.4sc" "...
by Docfxit
10 Feb 2020 15:32
Forum: DOS Batch Forum
Topic: How to create a For loop to execute lines in the same .bat file
Replies: 6
Views: 4392

Re: How to create a For loop to execute lines in the same .bat file

I'm having a problem when I have a value that I need to delete. This is what I have created: for %%k in ( "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs" /V "C:\\Windows\\system32\\SCHelp.dll" ) DO Echo REG Delete "%%~k" /F It deletes all values and "HKLM\SOFTWARE\Microsoft\Windows\Curre...
by Docfxit
10 Feb 2020 13:41
Forum: DOS Batch Forum
Topic: How to create a For loop to execute lines in the same .bat file
Replies: 6
Views: 4392

Re: How to create a For loop to execute lines in the same .bat file

You are brilliant. That is exactly what I need. Very nicely done.

Thank you very very much.

That's super.

Docfxit
by Docfxit
09 Feb 2020 22:54
Forum: DOS Batch Forum
Topic: How to create a For loop to execute lines in the same .bat file
Replies: 6
Views: 4392

How to create a For loop to execute lines in the same .bat file

I have a .bat file that looks like this: (SET _KEY=SOFTWARE\Rainmaker Research) REG Delete "HKLM\%_KEY%" /V Config /F >NUL (SET _KEY=.1sc) REG Delete "HKCR\%_KEY%" /V Config /F >NUL (SET _KEY=.2sc) REG Delete "HKCR\%_KEY%" /V Config /F >NUL (SET _KEY=.3sc) REG Delete "HKCR\%_KEY%" /V Config /F >NUL ...
by Docfxit
27 Dec 2019 14:23
Forum: DOS Batch Forum
Topic: Bat file to create another bat file.
Replies: 18
Views: 2450

Re: Bat file to create another bat file.

are you sure you need -i ? try -d instead. With -d instead of -i On the PC I start the Psexec from it shows: cmd.exe started on 192.168.168.34 with process ID 7152. But nothing runs on that pc. c:\batch\psexec.exe @"C:\Batch\PushFileAndRunItComputerList.txt" -u MyUser -p MyPassword -d -c -v cmd.exe...
by Docfxit
27 Dec 2019 12:10
Forum: DOS Batch Forum
Topic: Bat file to create another bat file.
Replies: 18
Views: 2450

Re: Bat file to create another bat file.

It would be nice if the CMD window on the remote PC would run minimized. This runs with the CMD window open: c:\batch\psexec.exe @"C:\Batch\PushFileAndRunItComputerList.txt" -u MyUser -p MyPassword -i -c -v "C:\Dnload\9xAddons\Macrium\UpdateMacriumRun.bat" I tried adding cmd to it so it would minimi...