hello, path is set but error

kiu666

Member
Joined
Oct 10, 2025
Messages
4
path is set but error saying "windows cannot found a file called sleep.ink"
 
Hi kiu666 — let’s troubleshoot. That error usually means Windows is trying to open a file named exactly "sleep.ink" but can’t find it. Common causes are a typo (.ink instead of the shortcut extension .lnk), the Sleep utility not being on your PATH, or broken file-type associations. Forum threads show this exact symptom when Sleep.exe/shortcut isn’t found or PATH/associations are wrong.
Please try these steps and tell me the results (paste outputs or a screenshot):
1) Check whether the file really exists and whether the extension is correct
  • Open File Explorer → View → Options → View tab → uncheck “Hide extensions for known file types” so you see real extensions.
  • Look in the folder you expect for a file named sleep.*. If you see sleep.ink, rename it to sleep.lnk (shortcut) or to the correct executable name. In Command Prompt you can rename with:
    • ren "C:\full\path\to\sleep.ink" "sleep.lnk"
Why: Windows shortcuts use .lnk; .ink is a typo and Windows won’t treat it as a shortcut.
2) Verify whether an executable named sleep is on your PATH
  • Open a Command Prompt and run:
    • where sleep
    • echo %PATH%
    • echo %PATHEXT%
Expected: where sleep either shows the full path to sleep.exe (if present) or returns “INFO: Could not find files for the given pattern.” If the folder with sleep.exe isn’t in %PATH% add it or move the .exe into C:\Windows\System32 (only if trusted). Problems where commands in PATH aren’t found are common and often come from PATH/PATHEXT misconfiguration.
3) If you’re using a batch file that calls sleep, use a built-in alternative first
  • Replace sleep 17 with timeout /t 17 /nobreak >nul (Windows built-in) or ping -n 18 127.0.0.1 >nul (legacy trick).
    This avoids needing a third-party sleep.exe.
4) Check LNK/EXE file-type associations (if shortcuts/executables behave oddly)
  • If double-clicking shortcuts or EXE files gives odd “application not found” messages, your file-type associations may be corrupted. The forum advice is to restore default associations for EXE and shortcut types (there are small .reg fixes that re-register these). If you want to try that I can give safe steps and links; restoring these fixes many “file not found / application not found” problems.
5) If you expect Sleep.exe from Sysinternals/Resource Kit
  • Make sure you actually have a trusted Sleep.exe and place it in a folder on PATH (or call it with full path in your script). Don’t copy unknown executables into System32.
If you’re not sure which of the above fits, tell me:
  • Are you running a batch file or typing “sleep” in Run/CMD/Start menu?
  • What exact command produced the error and where were you running it from?
  • Paste the output of where sleep and dir /a "C:\path\to\folder\sleep*" (replace path) or tell me whether you saw sleep.ink in Explorer after showing extensions.
I’ll walk you through the next step based on those results.
 
Thanks — that path is helpful. Quick summary: that error normally means Windows is trying to open a file literally called "sleep.ink" (note the .ink) but can’t find it — usually because a shortcut or startup entry points to the wrong filename / a moved target, or a typo was made when someone added the entry. Forum archives show this exact pattern where .lnk/shortcut problems or missing sleep utilities produce similar errors.
Do this next (step‑by‑step). Tell me what each step shows and I’ll advise the exact fix.
1) Verify the shortcut target (fastest check)
  • Open File Explorer and go to:
    C:\hello\allapps\hgb\power opt\
  • Right‑click Sleep.lnk → Properties → Shortcut tab → look at Target and Start in.
  • If Target points to a file that no longer exists (red X or wrong path), that’s the cause.
If you prefer a single command to see the shortcut target, run PowerShell (not elevated) and paste these three lines:
$sh = New-Object -ComObject WScript.Shell
$lnk = $sh.CreateShortcut('C:\hello\allapps\hgb\power opt\Sleep.lnk')
$lnk.TargetPath
This prints the exact path the shortcut points to. If TargetPath is empty or points to something like "...sleep.ink" or a non‑existent EXE, note it here.
2) If the Target is missing or wrong — quick fixes
  • If the target executable was moved, edit the shortcut Target to the correct full path.
  • If the target is supposed to be a shortcut to a rundll32 command to put the PC to sleep, a typical Target is:
    rundll32.exe powrprof.dll,SetSuspendState 0,1,0
    (or sometimes a third‑party Sleep.exe). If the shortcut points to a non‑existent third‑party sleep.exe, either restore that .exe into the expected folder or change the shortcut to use the built‑in command above (only if you trust it).
3) Search where Windows is trying to load sleep.ink (startup locations)
The error could be from a Startup entry, Task Scheduler, or Run registry key that references sleep.ink. Check these places:
  • Startup folders:
    Win+R → shell:startup
    Win+R → shell:common startup
  • Task Manager → Startup tab (look for Sleep or unknown entries)
  • Task Scheduler → Task Scheduler Library (search for 'sleep')
  • Registry Run keys (make a restore point first):
    reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Run"
    reg query "HKLM\Software\Microsoft\Windows\CurrentVersion\Run"
    If any entry references sleep.ink (or an incorrect path), edit or remove it.
4) Search the disk/registry for literal 'sleep.ink' occurrences (optional)
  • PowerShell (may take a while if scanning C:
    Get-ChildItem -Path C:\ -Filter "sleep.ink" -Recurse -ErrorAction SilentlyContinue
  • Or search text inside files for a reference (faster if you target likely folders):
    Select-String -Path "$env:APPDATA\Microsoft\Windows\Start Menu\Programs*\" -Pattern "sleep.ink" -SimpleMatch
5) Use Autoruns if the source is stubborn
  • Download Autoruns (Microsoft Sysinternals), run as Administrator, type "sleep" in the filter box and you’ll see every startup/Run/Task entry that mentions it — uncheck or delete the broken entry. This is the easiest way to find hidden startup references.
6) Test after fixes
  • Double‑click the Sleep.lnk — if it runs, the problem is resolved.
  • If the error appeared at sign‑in only, restart to confirm it no longer pops up.
Safety note: create a system restore point before editing the registry or deleting startup entries. If you want, post the TargetPath you get from the PowerShell snippet and the exact place/time the error appears (on sign‑in, double‑clicking, scheduled task, etc.). I’ll tell you the exact value to delete or how to reconfigure the shortcut. Also — I see your post logged here in the forum activity.
 
its C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0
 
Good — since Sleep.lnk’s Target is the correct rundll32 command, the error means some other place is trying to open a file literally named sleep.ink (a typo) rather than your Sleep.lnk shortcut. Let’s find where that bad reference lives and remove/fix it. (I see your post in the recent activity list.)
Run these checks (copy/paste the commands into an elevated PowerShell or Command Prompt where noted). Tell me any lines that return results.
1) Confirm the shortcut file really is named .lnk (show extension)
PowerShell:
Get-Item 'C:\hello\allapps\hgb\power opt\Sleep.lnk' | Select-Object FullName,Name,Extension
If this shows Extension = .lnk, the shortcut file itself is fine.
2) Search the disk for any literal file named sleep.ink
PowerShell (may take a while):
Get-ChildItem -Path C:\ -Filter "sleep.ink" -Recurse -Force -ErrorAction SilentlyContinue | Select-Object FullName
If anything is returned, note the full path and delete or rename it (or tell me the path and I’ll advise).
3) Search common startup folders for anything referencing sleep.*
PowerShell:
Code:
$folders = @(
  "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup",
  "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup",
  "$env:PUBLIC\Desktop"
)
Get-ChildItem -Path $folders -Recurse -Force -ErrorAction SilentlyContinue | Where-Object { $_.Name -match '(?i)sleep\.' } | Select-Object FullName
4) Search registry for a reference to "sleep.ink"
Run these in an elevated Command Prompt:
Code:
reg query HKCU /f "sleep.ink" /s
reg query HKLM /f "sleep.ink" /s
If either returns a key/value that contains sleep.ink, paste that exact output here (do not delete yet — I’ll confirm it’s safe).
5) Check Task Scheduler and Startup entries
  • Open Task Scheduler → Task Scheduler Library → look for any task with “sleep” in its Name or Action. If you see an Action with sleep.ink, disable/delete it.
  • Open Task Manager → Startup tab → look for "Sleep" or unknown entries → Right-click → Open file location or Disable.
6) Use Autoruns (fast, comprehensive)
  • Download and run Autoruns as Administrator (Microsoft Sysinternals). Type sleep into the filter box. It will show every Run/Startup/Task entry mentioning sleep. Uncheck the offending line or right‑click → Delete. (Create a restore point before you delete registry startup entries.)
If you find an entry that points to sleep.ink, fix it as follows:
  • If the entry is a Run registry value: edit the value to point to the full rundll32 command (or delete the value):
    Example correct data: C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0
  • If the entry is a shortcut file named sleep.ink in a Startup folder: delete or rename it to Sleep.lnk and ensure its Target is the rundll32 command.
If none of the searches find sleep.ink
  • Paste here the outputs of:
    reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /s
    reg query "HKLM\Software\Microsoft\Windows\CurrentVersion\Run" /s
    and the result of the disk search from step 2. I’ll scan them and point to the exact key/entry to remove.
Extra reference: there are older forum threads showing the same symptom when a startup/shortcut entry is mistyped — Autoruns usually finds it quickly.
If you want, paste the results here (or a screenshot) and I’ll tell you the single command or click to remove the bad reference safely.
 
Thanks — that helps. Because you don’t have admin rights, we’ll stick to checks and fixes you can do as a normal user, and prepare clear info to give an admin if you can’t remove the bad entry yourself.
Short summary: the message means something is trying to open a file literally named sleep.ink (typo) rather than your Sleep.lnk shortcut. The usual places are your user Startup folder, a user Run value in HKCU, a per‑user scheduled task, or a stray file in your profile. The forum guidance I used suggests checking those user locations first.
Do these steps (no admin needed). Paste any output you get or tell me what you see.
1) Quick local check — does the shortcut itself work?
  • In File Explorer enable file extensions: View → Options → View → uncheck “Hide extensions for known file types.”
  • Open C:\hello\allapps\hgb\power opt\ and double‑click Sleep.lnk.
    • If it sleeps the PC, the .lnk is fine and some other entry is causing the popup.
    • If you get the same “sleep.ink” error when double‑clicking, rename the file in Explorer from Sleep.lnk to Sleep2.lnk and create a new shortcut: right‑click → New → Shortcut and paste this as the target:
      C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0
      Then double‑click the new shortcut to test.
2) Search only inside your user profile for any literal sleep.ink (fast, no admin)
  • Open PowerShell (normal user) and run:
    $env:APPDATA
    Get-ChildItem -Path $env:USERPROFILE -Filter "sleep.*" -Recurse -ErrorAction SilentlyContinue | Select-Object FullName
  • Also check your per‑user Startup folder:
    explorer "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup"
    Look for any Sleep.* (including sleep.ink). If you find sleep.ink, right‑click → Delete or rename to sleep.lnk and fix its Target.
3) Check your per‑user Run registry and environment (no elevation)
  • Open Command Prompt (normal user) and run:
    reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Run"
    echo %PATHEXT%
    echo %PATH%
  • If the HKCU Run output shows a value that contains sleep.ink or a bad path, copy the full line here. You cannot safely delete HKCU values without admin? (You can delete HKCU values as a standard user — but if you prefer I’ll tell you the exact reg delete command after you paste the output.) The PATHEXT check is to see whether .INK was accidentally added (that would cause Windows to look for sleep.ink first).
4) Check Task Manager → Startup and Task Scheduler (user tasks)
  • Open Task Manager → Startup tab — look for any item named Sleep or a shortcut you don’t recognize. Right‑click → Disable or Open file location (you can disable without admin for most user items).
  • Open Task Scheduler (Start → Task Scheduler) → Task Scheduler Library — scan tasks for anything named “sleep” or which runs a .lnk/.ink file; user tasks are shown and you can disable them if they belong to your account.
5) If you find a sleep.ink file or a startup entry pointing at it
  • If it’s a file in your profile, delete or rename it (safe).
  • If it’s a HKCU Run value, paste the reg query output here and I’ll give the exact command to remove it; reg delete HKCU\… (no elevation required for HKCU keys you own).
  • If it’s a Task Scheduler task that you didn’t create, disable it (right‑click → Disable).
6) If your account can’t remove the offending entry
  • Copy/paste these three outputs into a message for your admin (or paste here and I’ll format a short request):
    • Output of: reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /s
    • Output of the PowerShell search (Get-ChildItem command from step 2) — list of full paths.
    • A screenshot or path of the Sleep.lnk you showed me (C:\hello\allapps\hgb\power opt\Sleep.lnk) and whether double‑clicking it works.
  • Ask the admin to run Autoruns (Sysinternals) as Administrator and search for "sleep" and remove any entries pointing to sleep.ink; or ask them to run these elevated checks I suggested earlier (search HKLM Run, Autoruns). Autoruns finds hidden startup entries quickly.
What I need from you (paste here)
  • Result of step 1 (does the .lnk actually sleep the PC?)
  • The PowerShell search output from step 2 (or tell me if you found sleep.ink in your Startup folder).
  • The output of reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" (if any entry contains sleep.ink paste it).
I’ll give the exact one‑line commands to delete or rename the offending item once you paste those outputs. If you prefer, tell me whether you want step‑by‑step screenshots or a short message you can forward to your admin — I’ll prepare that for you.