Jump to content

Deleting %AppData%


Recommended Posts

Hello! :hello:

I have one really anoying folder %AppData% in my c drive. I'm using runoonceex method in my unattended win xp cd during t-13 setup stage (with "rundll32.exe iernonce.dll,RunOnceExProcess"). After computer reboots, on my c drive there's **** folder %appdata%. I can't delete it with batch, because %appdata% is variable, and my batch deletes whole "C:\Documents and Settings\Admin\Application Data" folder.

Please help anyone.

:w00t:

Link to comment
Share on other sites


Ive never heard of anything like this before but it may have something to do with the distributions folders located at $Oem$, $1, $$ etc look at the folder and see which ones you have and then again it could be a folder created through an application!!

Link to comment
Share on other sites

from the sounds of it there is a folder on his HDD

entitled %appdata%

(eg. c:\%appdata%\)

MasterJ you may wanna confirm this. :hello:

you may have to hard code the path into the batch to get it deleted though

eg

rmdir c:\%appdir%\

try it out see if it works (i don't recommend doing this on a live machine though, use a test machine) :whistle:

Link to comment
Share on other sites

What about

RD /S/Q C:\^%APPDATA^%

Also if you have a folder by that name, it is due to an error on your part. You would be better off trying to find the cause of the folder creation rather than the fix.

Link to comment
Share on other sites

Windows creates the environment variables such as %APPDATA% before T13, therefore there must still be an error either with something you are doing or with the application which is creating the invalid folder.

Explanation:

  • APPDATA=C:\Documents and Settings\%USERNAME%\Application Data
    HOMEDRIVE=C:

Therefore the folder is incorrectly being created as %HOMEDRIVE%%APPDATA% i.e C:\C:\Documents and Settings\%USERNAME%\Application Data

Anyhow, did you try the code I gave you to remove it?

<Edit>

It is tested and working on my XP and 2K machines

</Edit>

Edited by Yzöwl
Link to comment
Share on other sites

Sounds like an application is trying to install before the environment variable and physical folder is created. Therefore it simply makes its own and it badly assumes that it should be on your C hard disk.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...