📎 AI Summary:
The user reports an issue where a desktop AutoHotkey (.ahk) script runs normally when double-clicked but shows a "Windows cannot access the specified device, path, or file" error when run as administrator on Windows 10 Home. Despite being logged in as an administrator and owning the file, the problem persists across various locations, and it seems related to permission restrictions or security settings preventing admin access. Several suggestions point to moving the file to a different directory or creating a shortcut, but the user confirms the issue remains unresolved across different folders.

iamstuckplshelp

New Member
Joined
Feb 2, 2016
Messages
3
Thread Author #1
I'm facing a new problem with my computer today.

There is a file on my desktop. I can double click it to run it normally. No problems at all.

However when I run the file as administrator (right click file -> Run as administrator) I receive the following error message: "Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item."

I tried searching on google, and have found much, but none of the solutions worked. Also, the problems I found were not caused by "Run as admin"; I couldn't find anything like what I'm experiencing. Again, the file runs perfectly fine when it is opened normally, however when I run it as admin, the error pops up and the file does not run.

My operating system is Windows 10 Home. Any help is appreciated!
 

Solution
I am logged in as an Administrator (went to control panel -> user accounts, underneath my logged in account it says Administrator).

The file belongs to me (right clicked file -> properties -> security -> advanced, next to "Owner: " is my account name).

The file is an AutoHotkey (.ahk) file that is supposed to run an automatic keyboard script. I need to run it as Admin because what I'm using it for is game-related, and apparently you need to run as admin for it to work in some games.

The file, as far as I know, does not point to anywhere? It is not a shortcut, just a file on the desktop that I created.

MinecraftKid45

Well-Known Member
Joined
Jun 1, 2015
Messages
80
Are you logged on as an Administrator? Does the File belong to someone else? What is the Application?
 

iamstuckplshelp

New Member
Joined
Feb 2, 2016
Messages
3
Thread Author #4
I am logged in as an Administrator (went to control panel -> user accounts, underneath my logged in account it says Administrator).

The file belongs to me (right clicked file -> properties -> security -> advanced, next to "Owner: " is my account name).

The file is an AutoHotkey (.ahk) file that is supposed to run an automatic keyboard script. I need to run it as Admin because what I'm using it for is game-related, and apparently you need to run as admin for it to work in some games.

The file, as far as I know, does not point to anywhere? It is not a shortcut, just a file on the desktop that I created.
 

Solution

ussnorway

Windows Forum Team
Staff member
Joined
May 22, 2012
Messages
4,598
just a file on the desktop
basic administrator does not have permission to go to another accounts desktop...
move the file off the desktop and than have a shortcut (on the desk top) pointing to the file.
 

iamstuckplshelp

New Member
Joined
Feb 2, 2016
Messages
3
Thread Author #6
I tried putting it in various locations such as my C drive, Documents folder, Downloads folder, and somewhere in my User account folder, but the same problem persists wherever the file is.

Also, I think my computer only has one active account. I'm the only one who uses it. The files on my desktop are stored within my user account (C:\Users\Me\Desktop). There are several other folders in C:\Users, such as an invisible folder named Default, a folder named Public, and a few that have to do with "postgres" (which I don't think is related to the issue).
 

Last edited: