Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove secure directory

Status
Not open for further replies.

disturbedone

Vendor
Sep 28, 2006
781
AU
We have a lot of scripts used to install applications in our environment. We're a school and our Start Menu is customized and standard across all PCs. Part of the script moves the short cuts to an "A-Z of Programs" folder in the Start Menu and then the final part deletes the original Start Menu folder. Currently we're on XP but are moving to 7.

For example, UltraVNC installs and is found in Start/Programs/UltraVNC/viewer.exe etc. This is moved to Start/Programs/A-Z of Programs/Tools/viewer.exe (or something similar). Then the script runs rmdir /s /q "C:\Documents and Settings\All Users\Start Menu\Programs\UltraVNC" to remove the default entry from the Start Menu.

But this location has moved in Win7 and is now protected (folder has padlock when viewed in Explorer). The location is now C:\Users\All Users\Microsoft\Windows\Start Menu\Programs\UltraVNC" but simply changing the script for the new location gives an 'Access Denied" error.

Is it possible to run rmdir to delete such a folder? If so how? If not are there other options?
 
No need to worry with this one. I'm using Dell KACE to run the script and I needed to make it an 'Online Script' that allows it to run as the Local System account and this means UAC doesn't get in the way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top