Remove-Item & Program Files folder: permissions error

I am attempting to use Remove-Item to delete a file in Program Files and getting a permissions error. But, I am a local admin, and I tried running the script as administrator. I have also tried -Force, to no avail. I hope I don't have to go back to the DOS
kludge I used in VBScript.
Any thoughts?
Gordon

Well, this is odd. I tried doing it in the ISE, super simple, just Remove-Item and the raw path. Errors. But I verified that the folder in question is set to read only. So in the ISE I added -Force. And it worked.
So I went back to my code and added -Force back in. And it worked. I assume if I misspelled it or something I would get an error, and I can't imagine the order makes any difference. May be that midnight is just a bit late to be playing in this sandbox.
EDIT: The plot thickens. I have another folder giving me grief, but this folder actually says in Explorer that I don't have permission to view the folders permissions. this is a lame leftover folder after a (typically incomplete) Windows uninstall. Is there
perhaps a PowerShell way of taking ownership of a folder like this? In my VBScript version I actually used DOS commands to do the deletes, and they all worked. 
Thanks!
Gordon

Similar Messages

  • Download doesn't work; i keep getting "unable to find firefox.exe" even when I open from program files folder; working onwindows xp with service pack 3

    download doesn't work; i keep getting "unable to find firefox.exe" even when I open from program files folder; working onwindows xp with service pack 3

    As you can see below, when I right click, I have no such option.  In the User Account Settings, I'm operating as the "System Administrator".
    Any other suggestions?

  • HT1925 I was trying to make sure that all my Apple software was uninstalled, and I still can't remove C:\Program Files\iPod\.  I went to the Task Manager and it is not listed in the Processes tab.  What do I do now?

    I was trying to make sure that all my Apple software was uninstalled, and I still can't remove C:\Program Files\iPod\.  I went to the Task Manager and it is not listed in the Processes tab.  What do I do now?

    Are you looking for iPodService.exe?
    Might be better to run services.msc from the run dialog and shut down the service polietly.
    tt2

  • The update.exe file seems to be in the C:/User/Appdata folder as well as C:/Program file folder..is the one in appdata folder normal?

    When firefox checks for update, the update.exe seems to be in 3 different locations- c:/user/appdata & c:/program file/. Am doubtful of this.Shouldn't it be only in the program files folder?Is it safe to update?

    updater.exe is found in 29 location(s)
    <pre><nowiki>%ProgramFiles%\Mozilla Firefox\
    %ProgramFiles%\\Mozilla Firefox\
    %CustomPath%\
    %SystemDrive%\software\internet\Mozilla Firefox\
    %ProgramFiles%\Mozilla Firefox 3 Beta 3\
    %UserProfile%\\Impostazioni locali\Dati applicazioni\Mozilla\Firefox\Mozilla Firefox 3 Beta 2\updates\0\
    %ProgramFiles%\Mozilla Firefox 3 Beta 4\
    \%Documents and Settings%\%username%\local settings\application data\mozilla\firefox\mozilla firefox\updates\0\
    %UserProfile%\\Impostazioni locali\Dati applicazioni\Mozilla\Firefox\Mozilla Firefox\updates\0\
    %ProfilesDirectory%\%UserName%\Local Settings\Application Data\Mozilla\Firefox\Mozilla Firefox\updates\0\
    %UserProfile%\\Local Settings\Application Data\Mozilla\Firefox\Mozilla Firefox\updates\0\
    \%Documents and Settings%\%username%\appdata\local\mozilla\firefox\mozilla firefox\updates\0\
    %UserProfile%\.KRAKATOA\Impostazioni locali\Dati applicazioni\Mozilla\Firefox\Mozilla Firefox\updates\0\
    \%Documents and Settings%\%username%\local settings\application data\mozilla\firefox\mozilla firefox2\updates\0\
    \%Documents and Settings%\%username%\local settings\application data\mozilla\firefox\mozilla firefox 3 beta 3\updates\0\
    %ProfilesDirectory%\%UserName%\Ustawienia lokalne\Dane aplikacji\Mozilla\Firefox\Mozilla Firefox\updates\0\
    %ProfilesDirectory%\%UserName%\Configurações locais\Dados de aplicativos\Mozilla\Firefox\Mozilla Firefox\updates\0\
    %ProfilesDirectory%\%UserName%\AppData\Local\Mozilla\Firefox\Mozilla Firefox\updates\0\
    %ProgramFiles%\Firefox\
    %UserProfile%\\Local Settings\Data aplikací\Mozilla\Firefox\Mozilla Firefox\updates\0\
    %ProfilesDirectory%\%UserName%\Lokale indstillinger\Application Data\Mozilla\Firefox\Mozilla Firefox\updates\0\
    %ProfilesDirectory%\%UserName%\Ustawienia lokalne\Dane aplikacji\Mozilla\Firefox\Ffox\updates\0\
    %ProfilesDirectory%\%UserName%\Local Settings\Application Data\Mozilla\Firefox\Mozilla Firefox\updates\0(2)\
    %ProfilesDirectory%\%UserName%\AppData\Local\Mozilla\Firefox\other\Mozilla Firefox\updates\0\
    %ProfilesDirectory%\%UserName%\Local Settings\Application Data\Mozilla\Firefox\Multimedia\Mozilla Firefox\updates\0\
    %ProfilesDirectory%\%UserName%\Impostazioni locali\Dati applicazioni\Mozilla\Firefox\Mozilla Firefox\updates\0\
    %ProfilesDirectory%\%username%\Configuración local\Datos de programa\Mozilla\Firefox\Mozilla Firefox\updates\0\
    %SystemDrive%\DEF_K\Dk124\Mozilla Firefox\updates\0\
    %SystemDrive%\Ut\firefox\
    </nowiki></pre>

  • Encrypted Profile Migration from XP to Windows 7 (Windows & Program Files Folder not Available)

    I'm trying to migrate a few encrypted profiles from Windows XP to Windows 7 
    I have a disk without "Windows" and "Program Files" Folder with the userprofiles without a backup of recovery agent and related certificates. 
    By USMT or in another way it is possible a deployment and recovery (also partial) of these userprofiles folders? These data can be accessible in some way or there are lost forevar? 
    During USMT deployment by scanstate/loadstate cmdline tools: I used to be specify a KeyString
    after the switch command "/encrypt /efs:". I can blank "/efs:" argument during USMT Deployment? 
    Thank you.

    Sadly, without a backup of encrypted userprofiles, related data are unusable after scanstate phase.
    Anyway, what
     Hetti
    Arachchige V Aravinda had written is very important to know when you copy or move ecrypted folder and files in a different partition or in a another disk.
    Thanks Hetti
    Arachchige V Aravinda for your good info and tips. 

  • Does SyncToy 2.1 keep file/folder permissions?

    Does SyncToy 2.1 keep file/folder permissions?
    Thx,
    J

    Hi Texxxas,
    Apparently the problem is not with SyncToy, it is with Task Scheduler. If you have had Task Scheduler work for you in the past, then I don't have an answer for that. I have never been able to get Task Scheduler to work correctly with SyncToy and a NAS drive.
    I have found that for some reason it works with USB external HDD's but will not work with a network connected hard drive. The same bug exists in Win8.1 as well. However, I have since found a third party task scheduler that works perfectly with SyncToy and
    my NAS drive. It is called System Scheduler by Splinterware. The free version only works when you are logged in but they have a paid version that runs as a service and will execute without being logged in. This has solved my problem.

  • ITunes 10.4 on Windows 7, empty program files folder and no icons

    I uninstalled iTunes on my pc and not I am reinstalling iTunes 10.4 x64 on my Windows 7 PC.
    The program states that it install successfully.
    However, there are no icons for iTunes AND the default install folder, c:\program files (x86)\iTunes, is empty.
    I have uninstalled all itunes components from previous install (bonjour, mobile device, etc).  I have removed folders after uninstalls.
    Any advice would be helpful.
    Thanks

    Guess what ...
    I gave it a last try, and followed the uninstall procedure from the Apple support site (again),
    then checked that all directories they listed were gone (they were), then removed every trace
    of "Apple" and "Apple Inc." from the registry, rebooted, then installed iTunes 10.4.0.80 again
    after downloading it from the Apple site.
    After it started - surprise - it still knew about the different location of my library, and all my settings,
    from sync to encoding, were still there!
    Then I connected the iPhone, waited until Windows 7 told me the drivers were installed and working,
    and I right-clicked the iPhone in iTunes and selected "save" (backup).
    And - oh wonder - the backup finished in less than two minutes, INCLUDING music and video files!
    Next I did a regular sync - and, oh horror ...
    First, it told me some 30 contacts would be changed. Although I couldn't see any difference from the
    conflict display (guys, when there is a conflict, show me WHAT is different - is it THAT hard?!?!). I told it to update the entries in Outlook, let the iPhone win.
    Next - shock number two - it told me one entry in my calendar would be new, but some almost 400 would be different. It seems they all have one day offset ...
    Great ... now I need to check out all my data in Outlook.
    Oh boy ... three years that this problem comes and goes, by now it hadn't hit me personally, but now it has.
    I'm really done with that **** - now I *can* sync and backup, but what's the point if it corrupts my data?!?!
    Hey APPLE ... I'm soooooooo p*ssed !!
    P.

  • Honour space in Program Files folder

    Hi,
    I am upgrading my APEX to version 3 on my local machine. I have previously done this successfully on my OS = XP ...
    <br><br>
    SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 28 11:49:37 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL> connect sys/yourSystemPassword@xe as sysdba
    Connected.
    SQL> @apxldimg.sql C:
    PL/SQL procedure successfully completed.
    old 1: create directory APEX_IMAGES as '&1/apex/images'
    new 1: create directory APEX_IMAGES as 'C:/apex/images'
    Directory created.<br>
    But now I want to put the application under the folder C:\Program Files, the problem that I am having is the space between Progam Files is causing problems. I have tried using %20, with no success.<br>
    Is there any way to get iSQLPlus to recognise the space?
    <br><br>
    Thank You
    Ben

    Hi,
    So the zip file (apex_3.0.1.zip) that I unzip into a folder of my choice can be removed (the folder structure created by the zip process).
    It creates a structure like this can I delete this after installation ...
    C:\Program Files\apex\builder
    \ core
    \ doc
    \ images
    \ owa
    \ utilites
    Second thing, your comment about iSQL Plus.
    I better make sure that I am referring to the correct thing. In my start menu I navigate to Oracle Database 10g Express Edition > Run SQL Command Line.
    Is this iSQL Plus? This is what I was calling iSQL Plus.
    Ben

  • Sharing files among different user accounts -- file/folder permissions?

    I have two main user accounts that I switch between during the day (essentially a PERSONAL account and a WORK account). This allows me to keep separate Mail, iCal, etc -- as well as desktop applications and file organization. However, I am having some major issues with sharing data between the user accounts.
    WHAT I WANT: A local drop box for shared communal files between these two primary users. Seems simple enough, right?
    WHAT I DID: I created a subfolder in /Users/Shared/ called "COMMUNAL DROP BOX" and set the permissions to R/W for both my user accounts, and no access for the other accounts. However, when I copy files into this folder from my PERSONAL account -- it retains the file level permissions. For example, I grabbed some photos from my iPhone that I shot of a display for work -- I grabbed them off the phone and then dragged them into the drop box. They are in the shared folder, but the file perms are set to PERSONAL_ACCOUNT "Read & Write" and Everyone "No Access." There's no way I can continue to individually change every single file's permission -- how do I set it up to automatically match the folder, so that files like this are then readable by my work account?
    -Jason M.

    On my machine I've created a directory(folder) in the /Users directory called localshare. Since the directory can have just one owner, I've made root own the folder.
    sudo mkdir /Users/localshare
    Every user on my machine belongs to the group-Staff. I need to change the group class on the localshare directory that I've created.
    sudo chown :staff /Users/localshare
    As a reference, I changed the traditional permissions to reflect my desired results and lock down the permissions some.
    sudo chmod 770 /Users/localshare
    I have added an ACL on the localshare directory that allows the group staff to do anything within the directory- make file and directories, modify files that they do not owner, etc.
    sudo chmod +ai "staff allow list,addfile,search,delete,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,file_inherit,directoryinherit" /Users/localshare
    This works well for me with one issue. Files or folders must be copied to the localshare directory. They cannot be moved.
    Message was edited by: Mark Jalbert

  • Remove C:\Program Files\sapinst_instdir after successful installation

    Hello,
    do you recommend to delete the directory C:\Program Files\sapinst_instdir after successful installation.
    It wastes ~500 MB disk space.
    Thanks,
    Juergen

    yes.
    if the installation was successful. i've experienced, that you won't read logs of a successful installtion anymore...
    but you could also zip & archive it somewhere.
    if you plan to do further installation you even SHOULD remove/rename the directory.
    kr, achim

  • Can't Write to Program Files folder

    I am unable to copy files to the Program Files or Program Files (x86) folders, despite my status as Administrator on a single-user system. As an advanced user, I have many legitimate needs to place files there and cannot live with this level of protection
    from myself.
    How can I defeat this? Many thanks.
    Rick A.
    Pleasanton CA

    While I understand MS's position, they are unrealistic, and seems to be going the way of iOS by hiding the ability to do simple things.
    I can understand the need to set up an operating system for the masses (who don't understand computing concepts very well) so that it's more "idiot proof".  The problem is that people who don't fully understand what they're doing tinker around
    and destroy their ability to run Windows.  Or malware does it for them.
    And I don't think anyone ever said that the file system security setup - originally developed by Digital Equipment Corporation - is simple or easy to deal with.  I got training in it at a 1980 DEC conference that has proven oh so
    valuable in dealing with permissions issues over the decades.  It's funny the little things that prove useful in life.
    With suitable knowledge and reconfiguration (and even the application of 3rd party programs) the system CAN be made to be much more powerful FOR the (knowledgeable) user and less protected FROM the (knowledgeable) user.  This suits power-users.
    Some things said in this thread that are not accurate or are incompletely stated:
    ...you can't turn off UAC any more...
    Well, you CAN - through a registry modification - though because of Microsoft's decision to arbitrarily limit functionality this completely shuts out the possibility to run Metro/Modern apps.  For those who only need desktop functionality
    this isn't a bad thing.
    ...you should not use an administrator user for day to day tasks. it puts your system at risk..
    This is overgeneralized.  In terms of advice for everyday non-technical users, this may be reasonable, but there are cases where computer-knowledgeable people really do need to be able to do that to get all the productivity they can.  There
    are ways to insulate oneself from malware that are FAR better than inviting it into your system (IE runs ActiveX from the Internet Zone by default) then trying to block it at the last possible second.  Most people consider UAC prompts nothing more
    than irritating and just click through them as quickly as possible.  If avoiding malware is something you'd like to do,
    even if you'd prefer to continue to run with UAC enabled, I suggest taking the following three measures:  Get the
    hosts file from mvps.org, reconfigure Internet Explorer so as to not allow ActiveX to run from the Internet zone, and replace the out-of-box antivirus protection Microsoft provides with something better (e.g., Avast!).
    -Noel
    Detailed how-to in my eBooks:  
    Configure The Windows 7 "To Work" Options
    Configure The Windows 8 "To Work" Options

  • Failed to add item: Generic file I/O error

    One of our iPhone users once in a while gets this response in e-mail from our mobility server since we updated it to Mobility 2.0.1.
    From: Mobility Administrator
    Date: 18 Jun 2014 22:56:26 GMT+2
    To: "Username" <[email protected]>
    Subject: Failed to Add Item
    Mobility failed to add the following item because: Generic file I/O error
    Item Type: Email
    Subject: Re: Project blabla
    From: Mobility Administrator
    Date: 17 Jul 2014 23:00:48 GMT+2
    To: "Username"
    Subject: Failed to Add Item
    Mobility failed to add the following item because: Generic file I/O error
    Item Type: Email
    This one came two times with only 3mins between. Was a response to separate e-mails.
    Strange symptom: The message is saved, sent and delivered anyways.
    Occurrence: maybe once every 4 weeks.
    Sent to both internal as external addresses.
    Plenty of free space on both the Mobility and GWIA server.
    Update order: Data Synchronizer 1.2.5 to 2.0.0 (CD update) and then through yast-patterns to 2.0.1 everything according to the upgrade manual.
    Update date: 26/may/2014
    All hard disks in SAN are fine, running on VM SLES11SP2
    Any ideas what might be causing this?

    In article <[email protected]>, Jvzuijlen wrote:
    > @konecnya: I'm not sure which volume type was used as this is our GW
    > administrators job, but reading the installation documentation i think
    > it is an NSS volume specially created for it. It's SLES11SP2 running on
    > XenServer. The GRPWISE partition is: /dev/xvdb
    that tells me more about the underlying XEN side, i.e. What 'hardware' is
    in use. A df -h can tell better if it is an NSS volume, as per this
    example.
    Filesystem Size Used Avail Use% Mounted on
    /Dev/pool/MAIL 750G 310G 441G 42% /opt/novell/nss/mnt/.pools/MAIL
    MAIL 600G 308G 293G 52% /media/nss/MAIL
    >
    > But i think the first thing we should test is working with the backup
    > settings. Probably the backup is set to lock the files during backup.
    > Our administrator will look at this when he's back from his holidays.
    Has your administrator had a chance to look into this yet? Backups do
    need to respect databases better than just locking their files, it needs
    to be a cooperative action.
    Andy of
    KonecnyConsulting.ca in Toronto
    Knowledge Partner
    http://forums.novell.com/member.php/75037-konecnya
    If you find a post helpful and are logged in the Web interface, please
    show your appreciation by clicking on the star below. Thanks!

  • Program Files folder on Symbian?

    Hi everyone,
    I'm wondering if there's a way to install all applications inside a folder located in the root of the mass memory, say "E:\Program Files", rather than each app taking up its own folder in the root.
    There would have to be a way for any installer to know that if I point to the mass memory during installation, this means that the app should be installed in E:\Program Files\AppName rather than in E:\AppName
    Obviously, when you have lots of applications installed, this really clutters up the root folder, and other folders you might have there (e.g. "Documents", "Movies") become a lot less visible. Thanks for any suggestions
    Solved!
    Go to Solution.

    There is no way to specify this in SymbianOS.
    FWIW the directory you see in the root folder doesn't contain the application itself but rather its data. The application is in a protected directory that doesn't show up on the built-in file manager.
    Was this post helpful? If so, please click on the white "Kudos!" star below. Thank you!

  • Why does iTunes 64-bit install in the 32-bit Program Files folder?

    If "iTunes 8.2.1 for Windows (64 bit)" is really a 64 bit application then why does the installer want to put the program into C:\Program Files (x86)\ on Vista 64-bit instead of C:\Program Files\? Is this just sloppy work by the Apple programmers or is this the first sign of potentially more problems with iTunes 64-bit?

    If "iTunes 8.2.1 for Windows (64 bit)" is really a 64 bit application
    It's not.

  • Windows server 2008 R2 File& Folder Permissions; Ghost Permissions From "Parent Object" Assigned to Folder Owner

    Windows 2008 R2 file server: Subfolders of a particular folder have an account that has Full Control permission that are listed as inherited. That account has no permissions in the parent folder. It was, however the account that was used to copy the folders
    and their contents in there from another source and was the owner of the folder.
    In Advanced Permissions, it shows them as inherited from "Parent Object" as opposed to the folder name of the parent folder (there are some of these.) (The parent folder of the place where the problem occurs does not inherit from _its_ parent)
    I removed it as owner and yet the permissions remained. (as displayed either through the GUI or with ICACLS.)
    If I make _any_ edit in Advanced Permissions, the 'ghost' permissions then go away (e.g. add my account with full control - I'm domain admin, so have that anyway) This step seems like it should be unnecessary, but it is required in this situation.
    I've done this to 5 of about 20 subfolders and it is consistent. Folders which did not have the 'problem account' as their owner did not exhibit this characteristic.
    This affects the files within the subfolders as well.
    Oddly, adding an owner to a folder has the same effect and required the same edit before the permissions are seen. This was tested on a different drive on the same server.
    Is this an anomaly, a bug, or expected performance?

    Hi,
    Do you mean that there is an account that has Full Control permission that are listed as inherited but it doesn’t appear in the parent NFS permissions? If so, please try to uncheck the "Include inheritable permissions from this object's parent" checkbox,
    clicking Apply.
    There is a similar thread, please go through it to help troubleshoot this issue:
    NTFS: I have a user’s that's inherited from parent folder but it doesn’t appear in the Parent ACL
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/6061af36-4d44-4de8-8139-d71f06d59a2c/ntfs-i-have-a-users-thats-inherited-from-parent-folder-but-it-doesnt-appear-in-the-parent-acl?forum=winserversecurity
    Regards,
    Mandy
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

Maybe you are looking for

  • New laptop imap but iphone currently pop. Can I change without losing anything?

    Good Afternoon. Apologies if this has been asked I have tried to search but didnt quite understand some of the answers. My partner currently has his iphone set up using pop. Yesterday we set his new laptop up and I set email up using imap. I am not s

  • Display users IP Address

    How can I display the IP address of the user in APEX? Is there any way to avoid displaying just the Proxy's IP address? Btw - I searched the forum and found this select statement: select utl_inaddr.get_host_name(OWA_UTIL.GET_CGI_ENV('REMOTE_ADDR')) h

  • Command line Twitter application suggestions

    [sorry if this is the wrong place, feel free to move it and yell at me] I can't seem to find any real command line Twitter applications, and wondered if anyone could recommend one? To read as well as write to Twitter, that is. I realise how easy it i

  • Invoice duplicata

    I have buyed two iPads at Apple Store New York at 17 november 2011, i have lost the invoice is it possible to have a duplicata by email. Best regards

  • System impact if new division created in CRM

    Hi, We have SAP CRM 7.0 and ECC 6.0,currently we have divisions 19,20,22 and 23 .These are maintained in ECC and replicated to CRM.Now there is requirement of new division and i am working on CRM  system impact analysis for sales process.Please let m