Author Topic: Unexpected temporary .tmp.bat file opened in local AppData folder...  (Read 109 times)

gfinlay

  • Junior Community Member
  • Posts: 5
  • Hero Points: 0
Hi,

I'm using SE Pro 2017 v22.0.0.9 64-bit. 
I find that SlickEdit repeatedly opens a window/buffer attached to a temporary batch file. 
e.g. C:\Users\<username>\AppData\Local\Temp\tmpB291.tmp.bat.
This is unexpected. The contents of the batch file are typically something like:
ping 1.1.1.1 -n 1 -w 1000
set /a waitCount=0
:Reattempt
set /a waitCount+=1
if %waitCount% gtr 60 goto :eof
If EXIST %1 (
ren %2 %3
move /Y %1 %2
ping 1.1.1.1 -n 1 -w 1000
GOTO Reattempt
) ELSE (rd "%~dp1" /s /q
move /Y %4 %5)
del %0


Any ideas what is causing this?

Thx,
Gord

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4031
  • Hero Points: 267
Re: Unexpected temporary .tmp.bat file opened in local AppData folder...
« Reply #1 on: December 05, 2017, 02:37:16 am »
Have you loaded any custom macros? While SlickEdit does on rare occasion generate temp .bat files, this one doesn't look like anything SlickEdit created and I searched our source code for snippets of this code and can't find it anywhere.
« Last Edit: December 05, 2017, 03:22:21 am by Clark »

mwb1100

  • Senior Community Member
  • Posts: 137
  • Hero Points: 12
Re: Unexpected temporary .tmp.bat file opened in local AppData folder...
« Reply #2 on: December 07, 2017, 01:21:56 am »
HP seems to use a similar batchfile for something-or-other.  Is your machine an HP computer by any chance?

  - https://h30434.www3.hp.com/t5/Notebook-Operating-System-and-Recovery/Strange-bat-file-execution-attempt-by-HPResources-exe/td-p/3406769

It looks like a batch file that is intended to wait until something is finished (as detected by "%1" no longer existing), then removing the directory that contained that file ("%~dp1") and everything in it.

Also some files are moved around. 

If I had to guess, this would be something that's part of an uninstall (or maybe install) routine.  If you can edit the file, perhaps add a line like the following after ":Reattempt" to see if anything useful shows up:

Code: [Select]
echo "%1" "%2" "%3" "%4" "%5" >> c:\temp\unknown-batch-file-args.txt

You might have to do it within 60 seconds of when it gets created - assuming it gets run more or less immediately after it gets created.