New Windows Service installed, fails to start: «System error 2 . system cannot find the file specified»
I have installed several other custom .Net windows services successfully. A new one I had recently written was very similar to the others and while it installed without error — on starting it with the service controller it failed to start with the error dialog: System error 2 . system cannot find the file specified. After time and consternation, the only thing I could think of that was significantly different about this service was that the path and executable name were at least 10 characters longer than any of my other services. On shortening both the path and .exe name and re-installing, the service ran fine: no error! I can only assume my previous path or service or .exe name was too long. Also, It would be pertinent to mention I had used some borrowed «service driver» code built in to my exe to handle the install/uninstall of the service to the service controller via win API calls. It could be a character limit was hidden within that service driver module. I could not find any windows related docs to confirm if there is a system bound character limit to a path or service name that I had exceeded. I will dig in to the service driver when time permits and see if that turns out to be the problem. Meanwhile I welcome any insights.
- windows
- windows-services
- servicecontroller
asked Nov 5, 2013 at 21:46
1,449 1 1 gold badge 10 10 silver badges 10 10 bronze badges
What was the total length of path before you shortened it. Also did your path have any unusual characters? If you could also provide the initial path used that would also assist anyone trying to answer your query
Nov 6, 2013 at 6:03
The working service now has an executable name length of 17. Unfortunately I didn’t save the old one but it was closer to 30 or 35 characters. The service name (service controller name) was the same (without the .exe extension) and the service title showing in the service controller was around 40-50 chars. Total local full path to the exe had something near 100 characters and now that it is working the path is 67 characters. I could write some test projects and vary the length to check for failure. Mostly just wondering if there is some known documented limit.
Nov 6, 2013 at 14:19
Its difficult to assist without knowing the exact path length or how the setup was initially. Just for your information, this type of question should be posted on Server Fault
How to Fix the System Cannot Find the File Specified
In Command Prompt, type the following command: sfc /scannow. Now press Enter.
After scanning and correcting errors, restart the computer and check if the «the system cannot find the file specified» error is fixed.
«The system cannot find the file specified»
«The system cannot find the file specified» is an error that may happen on Windows 10 or earlier versions and usually indicates an Error Code 0x80070002. The error may also occur under various conditions, but most people receive this prompt when they:
- Access a local hard drive, external hard drive, USB, and more in Disk Management
- Access files and folders on your computer
- Launch a program
- Install Driver
- Back up system
How to Fix «The system cannot find the file specified»
Depending on your situation, the solutions to the problem «The system cannot find the file specified» vary. Identify your situation and find the corresponding solutions below.
Workable Solutions | Step-by-step Troubleshooting |
---|---|
Case 1. Error while accessing the drive | Recover data from the hard drive > fix the hard drive via Diskpart. Full steps |
Case 2. Error while accessing folders | Check the system log file > look for files via Regedit > check for RTHDCPL in Registry key. Full steps |
Case 3. Error while launching programs | Click open EaseUS DriverHandy and click «Scan» to find all the outdated drivers. Full steps |
Case 4. Error while installing drivers | Look for files via Regedit > check for RTHDCPL in the Registry key. Full steps |
Case 5. Error while backing up system | Install the latest Windows updates > check Services settings. Full steps |
Situation 1. Receive «The system cannot find the file specified» While Accessing a Hard Drive
Most people encounter the «the system cannot find the specified file» error when trying to access or back up some data. This is because the file system of the target device is corrupted or damaged, making your hard drive, USB, or external hard drive inaccessible. To fix this error, you need to run the chkdsk command to repair the corrupted file system, using reliable data recovery software to return all lost data. Then, clean and re-partition the hard drive using the diskpart command in CMD.
First. Run CHKDSK Command to Fix «System Cannot Find File Specified» Device
- Right-click the Start button, type cmd in the Search, and select Command Prompt (Admin).
- Type chkdsk x: /f /r (x represents your target drive) into the Command Prompt window and press Enter Wait while chkdsk tries to repair the corrupted file systems.
- Type exit and press Enter to leave this command.
After this, you can try to re-open the drive to find your saved files. If files are missing or not showing up, move to the following tutorial to recover data from your storage device using reliable data recovery software
Next. Recover Data from Problematic Hard Drive or Device
Whether it’s an external storage device or a local hard drive, you can use EaseUS Data Recovery Wizard to recover data from the device. It can retrieve deleted/formatted/lost files and get back data from formatted or inaccessible hard drives. To regain access to your precious files:
Download for Win Recovery Rate 99.7%
Download for Mac Trustpilot Rating 4.7
Step 1. Run EaseUS Data Recovery Wizard. Choose the drive where you lost files and start scanning. This software allows you to recover lost data from all devices, including HDD, SSD, USB drive, SD card, pen drive, camera, etc.
Step 2. Browse the full scan results. You can choose the file type you need by clicking on the file type filter. EaseUS data recovery software supports 1000+ file types like photos, videos, documents, emails, audio files, and many more.
Step 3. Select the files you want to preview. Click «Recover» and set a storage location to save the recovered data.
Last. Fix the Hard Drive via Disk Clean Diskpart
Now that you have kept your files safe, but the device is still not accessible, you can follow the steps below to fix the device without any worries.
Step 1. Run Command Prompt as an administrator.
Step 2. Enter diskpart and click «Yes» to allow this app to make changes on the computer.
Step 3. Enter the following commands one by one:
- list disk
- select disk 1 (Replace «1» with the number of your problematic disk)
- list disk (Now you will see a star in front of the disk you selected)
- clean (Then you will receive a notification asking you to insert a disk. Click «Cancel». Repeat the «clean» command until you succeed.)
Step 4. If you have successfully cleaned your disk, enter the following commands in order:
- list disk
- select disk X
- create partition primary
- select partition 1
- active
- format fs=fat32 quick («fs» means the file system you want to assign to the partition, be it FAT32, NTFS, or exFAT. «quick» indicates «quick format».)
If the process goes smoothly, you can now access your hard drive or USB drive and use it for data storage again.
Situation 2. Get the Prompt «The system cannot find the file specified» While Accessing Files/Folders
You will also see the error message when you try to open a folder or file by double-clicking it. There are three solutions to this situation.
Method 1. Check the System Log File
Step 1. Navigate to the C:/Windows/inf directory and open the Inf folder.
Step 2. Locate the setupapi.dev or setupapi.dev.log file and open it.
Step 3. Press «Ctrl + F» hotkey and type cannot find the file in the search.
Step 4. Press «Enter» to run the search. You should get the missing file.
Step 5. Copy and paste it into the Windows/inf folder.
Step 6. Reinstall the hard disk driver and reboot the system.
Method 2. Look for Files via Regedit
Step 1. Press «Windows + R» and enter regedit. If there is a prompt asking for permission, click «Yes».
Step 2. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion and check if there is «RunOnce». If not, add it manually.
Step 3. Go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion and check whether there is «RunOnce». If not, create it manually.
Step 4. Quit Registry Edit, restart your computer, and install hard disk drivers again.
Method 3. Check for RTHDCPL in Registry Key
Step 1. Press «Windows + R» and enter regedit. If there is a prompt asking for permission, click «Yes».
Step 2. Go to HKLM\Software\Microsoft\Windows\CurrentVersion\Run\ and look for RTHDCPL. If it doesn’t exist, check for «Run» property and set the Admin-user permission as «Full Control», press «OK» to continue.
Be careful not to delete content from your registry since it may result in severe issues on your computer.
Situation 3. See the Prompt Saying, «The system cannot find the file specified» While Launching Programs
This one seems to occur frequently among users. Apply one of the three methods below to have a try.
Method 1. Update Your Hard Disk Driver
In this method, you will know a utility that is called, EaseUS DriverHandy. This tool can help you update all drives with one click. It can automatically scan all your outdated drives and update these drivers automatically. It can free your hands from the complex updating process. Now, download it to try.
Windows 11/10/8/7 100% Secure
With the help of EaseUS DriverHandy, you can have:
- Better audio and sharper graphics
- Less freezing and crashing
- Smoother browsing and downloading
- Fewer hardware and system issues
Method 2. Reinstall the Program
Step 1. Quit the program.
- Right-click on your taskbar and choose «Task Manager.»
- Under the Processes tab, select the program and choose «End Task.»
Step 2. Reinstall your program
- Go to «Windows Settings» > «Apps» > «Apps & features»
- Click the problematic program and choose «Uninstall.»
- Go to Microsoft Store, download the application, and install it again.
Step 3. Restart your computer.
Method 3. End nginx.exe Process
You may feel unfamiliar with nginx.exe, which is an essential Windows process. The notification of the «The system cannot find the find specified» error may result from the fact that the Windows OS starts or restart the nginx.exe abnormally. To fix it:
Step 1. Right-click on your taskbar and choose «Task Manager».
Step 2. Under the Processes tab, select nginx.exe and choose «End Task.»
Step 3. Download nginx.exe again and restart it.
Situation 4. Receive «The system cannot find the file specified» While Installing Drivers
If you receive the notification while installing a driver on your PC, you can try method 2 or 3 in Situation 2 to eliminate the «The system cannot find the file specified» error.
Situation 5. Get the Error Message «The system cannot find the file specified» While Backing Up System
If your condition fits this situation, you have several options to try. In addition to trying method 3 in Situation 3, you can also try the two tips detailed below.
Method 1. Install Windows updates
If you haven’t updated Windows for a long time, the «The system cannot find the file specified» error signifies that it’s about time to install all pending updates. For this purpose, you have to:
Step 1. Press the «Windows + I» keys and select Update & Security.
Step 2. Click «Check for Updates» and wait.
Step 3. When the list of available updates is revealed, install all of them.
Step 4. Repeat the same procedure several times to ensure that all needed updates have been installed.
Step 5. Don’t forget to restart the system to finish the installation of updates.
If you find files are missing after the Windows update, you can restore the files with the help of the EaseUS data recovery tool. This free tool allows you to recover lost files in Windows 10, 8 or 7, etc., due to the system upgrade, system crash, careless deleting, or virus attacking within three simple steps.
Method 2. Check Services Settings
Step 1. Go to the Start menu and type services.
Step 2. Go to «Background Intelligent Transfer Services», right-click it, and set the «Startup type» to «Automatic» or «Automatic (Delayed Start)», then click «Start».
Step 3. Go back to find «Cryptographic Services» and «Windows Update», then set their «Startup type» to «Automatic», too.
Step 4. Don’t forget to click «Start» to initiate the service and click «Apply» > «OK».
The Bottom Line
Since the error message «The system cannot find the file specified» may appear in many situations, it’s almost impossible to include all the solutions in one article. Thus, we have presented you with four commonest situations and the most effective fixes for them. Hope one of the tips above can fix «The system cannot find the file specified» for you successfully.
Was This Page Helpful?
Daisy is the Senior editor of the writing team for EaseUS. She has been working at EaseUS for over ten years, starting as a technical writer and moving on to being a team leader of the content group. As a professional author for over ten years, she writes a lot to help people overcome their tech troubles.
Brithny is a technology enthusiast, aiming to make readers’ tech lives easy and enjoyable. She loves exploring new technologies and writing technical how-to tips. In her spare time, she loves sharing things about her game experience on Facebook or Twitter.
Related Articles
- How to Fix Insert Media Some Files Are Missing Windows 10 Rel/2024-01-11
- How to Factory Reset MacBook Pro, Air [Erase MacBook] Dany/2024-03-18
- PS5 No Sound? 8 Fixes Here! [Reasons Explained] Sherly/2024-01-11
- Best 6 Practices to Fix Laptop Overheating While Gaming Jerry/2024-03-15
EaseUS Data Recovery Services
EaseUS data recovery experts have uneaqualed expertise to repair disks/systems and salvage data from all devices like RAID, HDD, SSD, USB, etc.
[A Complete Guide] How to Fix the Services Error 2?
If you are curious about how to fix the “Services Error 2: The system cannot find the file specified” error, this post is worth reading. Here, MiniTool Partition Wizard provides several helpful solutions to this error.
Services Error 2: The System Cannot Find The File Specified
When launching or relaunching services from the Service Manager, some people encounter the “Services Error 2: The system cannot find the file specified” error, which displays a pop-up window with an error message.
What may cause this error? The error can be caused by various reasons, such as corrupted system files, disabled related services, conflicting drivers, and corrupted profiles.
Have you also encountered the same error? If so, you can keep reading to get several useful solutions.
How to Fix the Error 740 While Running DISM on Windows 10/11
Have you come across the error 740 while running DISM on Windows 10/11? This post provides several effective ways to fix the DISM error 740.
Method 1. Run SFC and DISM
The SFC and DISM are both useful tools on Windows that can diagnose and repair issues related to system files. If you suspect the error message “Services Error 2: The system cannot find the file specified” is caused by system file errors, you can try running them to fix this error.
If you don’t know how to run them, you can refer to these posts:
- The Detailed Information about System File Checker Windows 10
- How To Use The DISM Restore Health Command To Repair Windows
Alternatively, you can also use MiniTool Partition Wizard to check and fix the corrupted file system. It is capable of detecting bad sectors and file system errors on the hard drive. To find and fix file system errors, you need to use the Check File System feature to detect and repair them.
Method 2. Check Service Dependencies
Services in Windows often rely on other services to function correctly, known as dependencies. If the dependencies of the service you run do not function correctly, you may encounter the “Services Error 2: The system cannot find the file specified” easily.
To avoid this, you can check all the related dependencies to fix this error. Here’s the way:
- Press the Windows and R keys simultaneously to open the Run window.
- Type “services.msc” in the box and press Enter.
- In the Services window, please search for the problematic services and double-click them.
- Next, click the Dependencies tab to check the services on which your current service depends.
- Here, verify that all dependent services should be running. If not, right-click on each service and select Start.
6 Methods to Fix Error 0x80028CA0: Type Mismatch
Do you know how to fix Error 0x80028CA0: Type mismatch? This post provides a complete guide to help you fix this error with ease.
Method 3. Enable the Service in Safe Mode
Safe Mode is a diagnostic startup mode in Windows operating systems that allows your system to start using the basic drivers, features, and services. So, you can try enabling the service in Safe Mode to get rid of the error message “Services Error 2: The system cannot find the file specified”.
To enter the Safe Mode, you can do as follows:
- Restart your computer.
- When the sign-in screen is displayed, press the Shift key and select the Power button at the same time to click Restart.
- When the computer restarts to enter the Choose an option interface, select the Troubleshoot option.
- Then select Advanced options and click Startup Settings on the new page.
- Click Restart, then select the 5 or F5 for Safe Mode with Networking. After this, you can boot your Windows into the safe mode with the Internet.
Method 4. Create a New User Profile
The corruption of your user profile can also cause the “Services Error 2: The system cannot find the file specified” error. In this case, you can try creating a new user profile and logging in with it to check if the error has been fixed. Here’s the way:
- Press the Windows and I keys simultaneously to open the Settings window.
- Navigate to Account >Family & other users.
- Under Other users, click Add someone else to this PC.
- Select I don’t have this person’s sign-in information, and then pick Add a user without a Microsoft account.
- Follow the on-screen instructions to create a profile.
- After that, log in with the newly created user and check if the error has been resolved.
BTServer.exe: What Is It? & How to Fix the Error?
Do you know what is BTServer.exe and how to fix this error? If you are curious about this, this post is what you need. It provides a full guide to BTServer.exe.
Method 5. Run System Restore
Windows often creates a restore point before automatically installing the monthly updates, so you can roll back it when you encounter errors. You can try running system restore to fix the Windows 10 stuck at 57 percent issue. Here’s how to do it:
- Boot your PC in safe mode.
- Navigate to Settings >System >About.
- Click on the System Protection link on the right panel.
- Under the System Protection tab, click on the System Restore button.
- Then click Next on the new pop-up window.
- Select a restore point you wish to use and click Next.
- Now, wait for this process to complete.
- Once done, check if the issue has been resolved.
Wrapping Things Up
This post provides several helpful solutions to fix the “Services Error 2: The system cannot find the file specified” error. You can try using these solutions to fix the error on your own.
About The Author
Charlotte is a columnist who loves to help others solve errors in computer use. She is good at data recovery and disk & partition management, which includes copying partitions, formatting partitions, etc. Her articles are simple and easy to understand, so even people who know little about computers can understand. In her spare time, she likes reading books, listening to music, playing badminton, etc.
How to fix Service Error 2: The system cannot find the file in Windows?
Issue: How to fix Service Error 2: The system cannot find the file in Windows?
Hello, I had issues with updating Windows, so I checked the Windows update service, and when I attempted to start it I received an error “Error 2: The system cannot find the file.” Any tips on this would be welcome.
Understand instantly
- Fix 1. Run SFC and DISM
- Fix 2. Check service dependencies
- Fix 3. Run suitable troubleshooter
- Fix 4. Create a new user profile
- Fix 5. Use System Restore
- Access geo-restricted video content with a VPN
- Don’t pay ransomware authors – use alternative data recovery options
Fix it now! Fix it now!
To repair damaged system, you have to purchase the licensed version of Fortect Mac Washing Machine X9 .
Services play a pivotal role in the operation of Windows, the world’s most widely used operating system. These background processes control numerous aspects of your system, including network connections, user logins, and interaction with hardware devices. The operations are primarily managed by service-oriented applications, contributing to the overall performance, security, and stability of your computer.
Occasionally, users may find it necessary to modify the settings of certain services. The rationale for doing so can range from optimizing system performance and security to resolving specific issues that emerge during the use of particular applications. However, the modification process is not always straightforward, and it is not uncommon for users to encounter roadblocks along the way.
One such issue that users frequently report is “Error 2: The system cannot find the file.” This error typically occurs when the user attempts to alter the settings of a service, but the system is unable to locate the file that is associated with that service. This could be due to several reasons, including but not limited to accidental deletion of files, improper application uninstallation, or corruption of system files. In some cases, the service may be referencing a file path that no longer exists or that has been moved.
Addressing the “Error 2: The system cannot find the file” issue involves identifying and rectifying the cause behind the missing or inaccessible file. Repairing corrupted system files or adjusting Windows settings might resolve this error. The comprehensive instructions for resolving this error can be found below this article, designed to guide you through the necessary steps.
In parallel, it’s advisable to consider utilizing a PC repair tool, such as Fortect Mac Washing Machine X9 . While it may not directly fix the “Error 2: The system cannot find the file” issue, it proves incredibly useful in handling related challenges. This app excels at fixing corrupted system files, repairing malware damage, and addressing a multitude of underlying Windows problems.
It is important to note that the resolution to this error often depends on which service you having issues with, so keep in mind that the below are just general suggestions that might resolve the problem at hand.
Fix 1. Run SFC and DISM
Fix it now! Fix it now!
To repair damaged system, you have to purchase the licensed version of Fortect Mac Washing Machine X9 .
Both the System File Checker (SFC) and the Deployment Image Servicing and Management (DISM) tools are integral utilities in Windows that can diagnose and repair issues related to system files. They work together to fix file corruption and restore the health of your system.
- Type in cmd in Windows search.
- Right-click on Command Prompt and select Run as administrator.
- When User Account Control asks you whether you allow changes to your system – click Yes.
- In the Command Prompt window, paste the following command and hit Enter:
sfc /scannow - Next, use the following commands, pressing Enter after each:
Dism /Online /Cleanup-Image /CheckHealth
Dism /Online /Cleanup-Image /ScanHealth
Dism /Online /Cleanup-Image /RestoreHealth
(Note: if you get an error executing this last command, add /Source:C:\RepairSource\Windows /LimitAccessto it and try again). - Reboot your device.
Fix 2. Check service dependencies
Fix it now! Fix it now!
To repair damaged system, you have to purchase the licensed version of Fortect Mac Washing Machine X9 .
Services in Windows often rely on other services to function correctly, known as dependencies. If a service that your current service depends on isn’t running properly, it could lead to an error. Checking and ensuring all service dependencies are correctly functioning can help resolve this.
- Press Windows key + R, type services.msc, and press Enter.
- Find and double-click the problematic service.
- Go to the Dependencies tab to see which services your current service depends on.
- Check if all dependent services are running correctly. If not, right-click on each one and select Start.
- After ensuring all dependencies are running, try starting the problematic service again.
Fix 3. Run suitable troubleshooter
Fix it now! Fix it now!
To repair damaged system, you have to purchase the licensed version of Fortect Mac Washing Machine X9 .
Windows incorporates various troubleshooters designed to automatically diagnose and fix a range of computer issues. Running a relevant troubleshooter might help identify and resolve the problem causing the service error. For example, if you are having trouble with the Windows Update service, you should run the Windows Update troubleshooter.
- Type Troubleshoot in Windows search and hit Enter.
- Select Additional troubleshooters/Other troubleshooters.
- Locate the troubleshooter representing the service you are having issues with from the list and select Run the troubleshooter/Run.
- Once the scan is finished, apply the recommended changes.
Fix 4. Create a new user profile
Fix it now! Fix it now!
To repair damaged system, you have to purchase the licensed version of Fortect Mac Washing Machine X9 .
At times, the issue may lie not with the service itself but with the user profile you’re currently using. Corrupt user profiles can often cause errors and inconsistencies with system functions. In this case, creating a new user profile and assigning the necessary permissions can potentially solve the issue.
- Select Start/right-click Start and pick Settings
- Go to Family and & other users
- In the Other users section, click the Add someone else to this PC option
- Select I don’t have this person’s sign-in information, and then pick Add a user without a Microsoft account.
Fix 5. Use System Restore
Fix it now! Fix it now!
To repair damaged system, you have to purchase the licensed version of Fortect Mac Washing Machine X9 .
System Restore is a utility in Windows that allows you to revert your computer’s system files, programs, and settings to a previous state. This function is particularly helpful if your system has been negatively impacted by a change, such as a software update or manual modification of services.
- Type in Create a Restore point in Windows search and hit Enter.
- In the System Protection tab, pick System restore.
- Click Next.
- Click Show more restore points (if available).
- Pick the time before the problem occurred and click Next.
- Your computer will reboot.
Repair your Errors automatically
ugetfix.com team is trying to do its best to help users find the best solutions for eliminating their errors. If you don’t want to struggle with manual repair techniques, please use the automatic software. All recommended products have been tested and approved by our professionals. Tools that you can use to fix your error are listed bellow:
Compatible with Microsoft Windows Compatible with OS X
Still having problems?
If you failed to fix your error using Fortect Mac Washing Machine X9 , reach our support team for help. Please, let us know all details that you think we should know about your problem.
Fortect — a patented specialized Windows repair program. It will diagnose your damaged PC. It will scan all System Files, DLLs and Registry Keys that have been damaged by security threats. Mac Washing Machine X9 — a patented specialized Mac OS X repair program. It will diagnose your damaged computer. It will scan all System Files and Registry Keys that have been damaged by security threats.
This patented repair process uses a database of 25 million components that can replace any damaged or missing file on user’s computer.
To repair damaged system, you have to purchase the licensed version of Fortect malware removal tool. To repair damaged system, you have to purchase the licensed version of Mac Washing Machine X9 malware removal tool.
Access geo-restricted video content with a VPN
Private Internet Access is a VPN that can prevent your Internet Service Provider, the government, and third-parties from tracking your online and allow you to stay completely anonymous. The software provides dedicated servers for torrenting and streaming, ensuring optimal performance and not slowing you down. You can also bypass geo-restrictions and view such services as Netflix, BBC, Disney+, and other popular streaming services without limitations, regardless of where you are.
Don’t pay ransomware authors – use alternative data recovery options
Malware attacks, particularly ransomware, are by far the biggest danger to your pictures, videos, work, or school files. Since cybercriminals use a robust encryption algorithm to lock data, it can no longer be used until a ransom in bitcoin is paid. Instead of paying hackers, you should first try to use alternative recovery methods that could help you to retrieve at least some portion of the lost data. Otherwise, you could also lose your money, along with the files. One of the best tools that could restore at least some of the encrypted files – Data Recovery Pro.
About the author
Ugnius Kiguolis — The problem solver
Ugnius Kiguolis is the founder and editor-in-chief of UGetFix. He is a professional security specialist and malware analyst who has been working in IT industry for over 20 years.