Quantcast
Viewing all articles
Browse latest Browse all 10386

PsTools : PSEXEC hangs when running WMIC.EXE

Author: Andaliu
Subject: PSEXEC hangs when running WMIC.EXE
Posted: 03 July 2014 at 4:36pm

Soo. Wimc is my new nemesis.
There is no reason this should work but it does.
I was testing my batch file and had just about given up on Wimc so I remarked the line. Imagine my surprise when it ran anyways and completed successfully.

Batch 1:
mkdir \\%1\c$\GetDet
copy Details.cmd \\%1\c$\GetDet
psexec \\%1 c:\GetDet\Details.cmd
copy \\%1\c$\GetDet\results.txt c:\GetDetResults\%1.txt

Batch 2:
@echo off
ipconfig |findstr "Address" >c:\getdet\results.txt
echo %computername% >>c:\getdet\results.txt
rem wmic /output:results.tmp csproduct list full
type results.tmp >>c:\getdet\results.txt
systeminfo | findstr "Total" >>c:\getdet\results.txt
type C:\win32app\Ingr\IMobile\FormValues\32814.fv | findstr "1004" >>c:\getdet\results.txt
type C:\win32app\Ingr\IMobile\FormValues\32814.fv | findstr "1005" >>c:\getdet\results.txt

Viewing all articles
Browse latest Browse all 10386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>