Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: The system cannot find the file specified.  (Read 7706 times)

0 Members and 1 Guest are viewing this topic.

DaveLembke

    Topic Starter


    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
The system cannot find the file specified.
« on: April 27, 2017, 11:38:37 AM »
So the batch file that I have that works on a Windows 7 64-bit system that I constructed it from doesnt like to work on a repurposed kiosk running Windows XP Pro.

I get "The system cannot find the file specified." message when running this batch.

I went in and poked around and found FIND.EXE missing from C:\windows\system32 so I grabbed a copy of FIND.EXE off of another Windows XP Pro system that had the file to keep with the same exact version of Windows and added it to C:\windows\system32 and still got this error message. So then I placed a copy of FIND.EXE in the root of where this batch executes and get the same error message. So then I checked to see if maybe its not finding ping for some reason so I copied PING.EXE to the root of where this batch executes and still same message.

Looked online and saw someone else with a problem with this message and an issue with NUL so I went down the path of verifying that NULL.SYS exists in C:\Windows\System32\Drivers\ and its there. I then went and checked the registry key and its enabled as seen in corrective action suggested at this site: https://groups.google.com/forum/#!topic/alt.msdos.batch.nt/gIlln0xEJmc And the problem is still there. I even went as far as specifying .exe to PING and FIND in the batch file to see if that would help, but still same error message.

So trying to figure out what I am missing?   Are there other dependencies for this batch to function properly?

I was surprised that a Kiosk running XP Pro would have had FIND.EXE removed from C:\Windows\System32 intentionally. So trying to un-cripple this Kiosk back to being used as a pinglogger.

*PING by the way works no problems and I have been using this Kiosk for 3 years now for monitoring. But this batch today sent me for a curve ball when it wasnt happy and I am looking at the batch and I dont see any problems with it, in which I then go on the depencency hunt to see whats missing and thats when I found that FIND.EXE was missing.

Here is the batch I am using to save people from having to go to the other page to see it:

Quote
@echo off
:restart

echo. Ping Logger v2.0 Running...

ping 127.0.0.1 -n 1 | find "Reply from" > nul
if %ERRORLEVEL% == 0 goto Device_Replied

ping 127.0.0.1 -n 1 | find "Request timed out" > nul
if %ERRORLEVEL% == 0 goto No_Reply


echo. Possible invalid IP address.
goto restart

:Device_Replied
echo. Ping of Device Was Succesful.
echo. On %date% at %time%
goto restart

:No_Reply
echo. No Reply from Device. Request timed out.
echo. On %date% at %time%
echo. %date% at %time% >>PingLog104.log
goto restart


http://www.computerhope.com/forum/index.php/topic,160559.0.html

DaveLembke

    Topic Starter


    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: The system cannot find the file specified.
« Reply #1 on: April 27, 2017, 04:07:40 PM »
Ok so.... I tried NULL instead of NUL because that caught my eye as possibility and sure enough XP on this system wants NULL while Windows 7 was happy with NUL

Now a new problem.... only one instance of this can be going at a time and I am pinging 6 different IPs in 6 separate shell windows... its strange that starting up another instance to a different IP to monitor kills off the prior thread. * I might have to create 6 unique numbered copies of whichever command only wants a single instance of itself .....  ::)  One of those days!  :P


Quick test on my Windows 7 64-bit system at home...... it doesnt mind NUL vs NULL as well as I can have multiple instances without any problems. That KIOSK is one oddball crippled XP. I guess I will wait until tomorrow to dig deeper into why only 1 instance can be running at a time since I cant see that here.  :-\

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: The system cannot find the file specified.
« Reply #2 on: April 27, 2017, 05:57:13 PM »
Did you see this?
http://www.computerhope.com/cgi-bin/process.pl?p=find.exe
Quote
What is find.exe?
Microsoft Windows file that should be located in the C:\Windows\System32 directory.
...and
Quote
Where can I download find.exe?
Because the find.exe file is a Windows Operating System file it is not recommend you download this file from any website. If this file is missing, it is likely other Windows related files are also missing, we suggest re-installing Windows to make sure your issue is correctly resolved.
Thos is embedded XP? do you have the exact version number?
Does this version compy a ROM into RAM before XP startts?
Quote
Windows XP Embedded
Windows XP Embedded, commonly abbreviated "XPe", is a componentized version of the Professional edition of Windows XP. An original equipment manufacturer is free to choose only the components needed thereby reducing operating system footprint and also reducing attack area as compared with XP Professional.
https://en.wikipedia.org/wiki/Windows_XP_editions#Windows_XP_Embedded
Quote
componentized version of the Professional edition of Windows XP. An original equipment manufacturer is free to choose only the components needed thereby reducing operating system footprint and also reducing attack area as compared with XP Professional.

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: The system cannot find the file specified.
« Reply #3 on: April 27, 2017, 07:04:52 PM »
Quote
Ok so.... I tried NULL instead of NUL because that caught my eye as possibility and sure enough XP on this system wants NULL while Windows 7 was happy with NUL
Throwing away always redirects to NUL. NUL probably isn't available on the kiosk for whatever reason- perhaps it is non-x86. using NULL works because it is redirecting to a file named NULL.
I was trying to dereference Null Pointers before it was cool.

DaveLembke

    Topic Starter


    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: The system cannot find the file specified.
« Reply #4 on: April 28, 2017, 06:42:44 AM »
Quote
Throwing away always redirects to NUL. NUL probably isn't available on the kiosk for whatever reason- perhaps it is non-x86. using NULL works because it is redirecting to a file named NULL.

hmm weird... so it could be anything as a throw away file then, other than NUL on the kiosk then. Interesting.

Also its Windows XP Pro SP2 and x86 build, but the company that made the kiosk crippled it greatly. For example in order to use it for something other than a kiosk I had to use the calculator trick to get brower up and from browser they didnt have local drives locked out and so I then was able to navigate to C:\Windows\System32 and start CMD.exe

From there I was able to add that to START->Programs which before only had option to shutdown or reboot or launch the kiosk software. With local admin access to kiosk and cmd shell I was able to do whatever i needed to from command shell or add it to START -> Programs ..... the desktop by the way is just a white screen. No icons and nothing can be dropped into the profile for desktop and have it appear. There is probably a registry edit that disables the desktop.

Lastly.... while I can bend this kiosk to use it at work as my manager and everyone else is aware of; I cant perform a clean install of a clean install of XP or Linux etc. NO SOFTWARE and NO OS's are allowed to be brought in. So its only whatever I can do with my hands with local physical access to it that is allowed. So launching NOTEPAD and making custom scripts to do stuff is ok as long as non malicious.

And for those wondering why doesnt your employer get you a real computer.... Ive been trying to get a real computer now for 8 years and this kiosk I trash picked  internally to the building and repurposed it out of desperation for a computer to do my job better.  ::) I was given a laptop 4 years ago from a manager that left and no one knew the password to get into it. It went back to central IT and never saw it ever again.  :-\

So this Pentium D minitower kiosk and a old 15" CRT on a metal cart on wheels with serial null cable and ethernet I wheel around and use it as a test and configuration system as an Electronics Technician.  We have some old electronics that in order to diagnose issues easier and faster at times you can connect to a 9-pin d-sub 9600 baud connection with hyperterm and run the boards through diagnostics and find the problem faster than tracing signals manually with an o-scope when the main MPU86 board for example is live and healthy to communicate with other boards in card cages.

People jokingly call the computer cart.... DAVES LAPTOP  ::) :P ;D

Hackoo



    Hopeful
  • Thanked: 42
  • Experience: Expert
  • OS: Windows 10
Re: The system cannot find the file specified.
« Reply #5 on: April 28, 2017, 06:56:14 AM »
What is the name of your batch file that you run from it ??

DaveLembke

    Topic Starter


    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: The system cannot find the file specified.
« Reply #6 on: April 28, 2017, 07:03:48 AM »
Its name was PingLogger100.bat and others were same name ending in 101, 102, 103, and 104. I thought maybe it was something with path length and so I even tested it at C:\TEST\ and still had same issue.

Hackoo



    Hopeful
  • Thanked: 42
  • Experience: Expert
  • OS: Windows 10
Re: The system cannot find the file specified.
« Reply #7 on: April 28, 2017, 07:32:24 AM »
Can you confirm me if this script : MultiPing Tester with colors works or not on your system (Windows XP) ?


DaveLembke

    Topic Starter


    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: The system cannot find the file specified.
« Reply #8 on: April 28, 2017, 10:31:58 AM »
Pretty Cool tool you made.

I tried it out on this system Win 7 64-bit and oddly it shows a dead connection at 10.0.0.99 as alive. I shared a screenshot showing all info below. I even did a traceroute to see if somehow 10.0.0.99 was resolving outside of my local 10.0.0.x network which it shouldnt be and it wasnt just to be sure.


Quote
C:\>tracert 10.0.0.99

Tracing route to 10.0.0.99 over a maximum of 30 hops

  1  PC2 [10.0.0.12]  reports: Destination host unreachable.

Trace complete.

C:\>

I will have to type all of this up from printed copy to run it on the XP kiosk box. No media is allowed to go from one system to another, but I can manually create from a printed copy the batch. But it might not be happening today. Maybe in the next couple days I can pick away at typing it up to get it to run on that box.

Also I was able to get multiple instances of what i was working with running when changing NULL to NULL0, NULL1, NULL2, NULL3, NULL4, and NULL5. The issue was that each instance was trying to write to same trash file, so giving each of them their own trash file worked.

I like your all in 1 approach... reading in a list of URL's or IP addresses from a text file and color representation too.  :) Somehow Destination unreachable is flagging as a false positive ping result though on this Win 7 system.  :-\



[attachment deleted by admin to conserve space]