Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Files I create falsely showing as locked by Admin

05 Sep 2018   #1
vbmike73

Windows 7, Windows Vista
 
 
Files I create falsely showing as locked by Admin

I have many processes that I have created and run through Excel VBA. These processes will save versions of workbooks, or Word files, or PowerPoint files onto my hard drive. Part of these processes is to clear any other files that may have been created the day before.

Here's the problem... randomly when I go to delete some of these files in Windows Explorer, it will tell me I have to have administrator credentials to proceed, even though this is a file that I created on my own hard drive. Other times I can delete them all with no issues. If I reboot, then usually the lock will go away and I can delete the file. Also, I cannot go into the properties and take ownership of it.

Any ideas?


My System SpecsSystem Spec
.
05 Sep 2018   #2
samuria

win 8 32 bit
 
 

That's built in security designed to ensure you want to delete it if it's created by a script it may not be owned by you but system
My System SpecsSystem Spec
06 Sep 2018   #3
vbmike73

Windows 7, Windows Vista
 
 

Appreciate your reply, but doesn't make sense to me. Why would it decide to treat one out of 200 files that way? Sometimes I can delete all of the files with no problem, and sometimes one or two will be held this way. What's causing it to treat the file or two differently? They are all being created the exact same way.
My System SpecsSystem Spec
.

06 Sep 2018   #4
samuria

win 8 32 bit
 
 

Thing to do is when you get this is check who owns it that will tell us more
My System SpecsSystem Spec
06 Sep 2018   #5
vbmike73

Windows 7, Windows Vista
 
 

Unfortunately I can't see any of this because it is asking for admin credentials. That's the problem. Even Admin is not the owner.
My System SpecsSystem Spec
06 Sep 2018   #6
samuria

win 8 32 bit
 
 

That won't stop you viewing the security properties it does suggest it's running as system may a what if in the script then runs as system if it's run by say a AT CMD that will be system
My System SpecsSystem Spec
06 Sep 2018   #7
vbmike73

Windows 7, Windows Vista
 
 

ok, but if my script saves let's say 200 files, in a loop, the exact same way, what would cause one of those to be treated differently?
My System SpecsSystem Spec
06 Sep 2018   #8
samuria

win 8 32 bit
 
 

Without knowing what's in the script it's hard to say
My System SpecsSystem Spec
07 Sep 2018   #9
vbmike73

Windows 7, Windows Vista
 
 

It's strictly just VBA in Excel, making a change in a couple cells, and saving the version off. So using...

ThisWorkbook.SaveAs "C:\filepath"

It flies through a couple hundred files in about 60 seconds. That's why I'm confused how it could treat random files differently.
My System SpecsSystem Spec
07 Sep 2018   #10
samuria

win 8 32 bit
 
 

Are they all saved in same folder as a folder permissions could be wrong
My System SpecsSystem Spec
Reply

 Files I create falsely showing as locked by Admin




Thread Tools




Similar help and support threads
Thread Forum
I am Locked out of my admin account
when i try to log into my admin account a message appears saying: The Referenced account is locked out and may not be logged onto. please help.
Software
Locked out of admin account
This morning I was remotely connected (via TeamViewer) to the office computer performing maintenance. I was in and out of the admin account several times while creating another standard user account. I tried to go back into the admin account and could not. Tried several time. I was real careful...
General Discussion
Have admin rights but can't create new file in Program Files (x86)
I'm trying to solve a problem with the Aspell spell-checker for Notepad++ by using the steps described at this link... SourceForge.net: Notepad++: Aspell files - en.pws , en.prepl However, when I right-click inside that folder to create a new text file, the only option in the "New" context menu...
General Discussion
Admin Privilages / File Locked
I recently installed Windows 7 Pro 64-bit. Love it. However...... My USB external 500gig hard drive is giving me problems with the change over. I try to access files and it states I need admin privilages.....I am the only user, I am an admin WTF!! Whats the deal there microsoft, fix your...
General Discussion
locked out of admin rights
hi, please can someone help? I have locked myself out of admin rights and hidden the only admin so now I can't adjust the setting or login to admin to fix, install anything or update! How? I created a registry key found through google to hide the administrator and I only wanted to use std...
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 19:14.
Twitter Facebook