Question

File is in use by another process - How can I find what is using / locking it?

Asked by: jonnyz0109

I am trying to delete a bunch of files (a profile folder, actually), but they are in use.  "Cannot delete ntuser.dat: It is being used by another person or program.  Close any programs that might be using the file and try again."  [OK]

And if I try and edit / open NTUSER.dat in notepad, "The process cannot access the file because it is being used by another process."

I am NOT logged into this current user, and the files should NOT be in use.  If you would like to know more information I can elaborate.  I need to know what is using these files, and how I can close those processes and/or services so these files get deleted when they are supposed to.

This is replacing another question that I've had open in this TA for the past 2 days, but received no comments.

Thanks in advance,
~ Jonny

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2004-11-17 at 06:45:38ID21210077
Tags

another

,

file

,

use

,

process

Topic

Windows XP Operating System

Participating Experts
7
Points
0
Comments
58

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Ntuser.dat Sharing Violation
    Running NT Server 4.0 (SP5) and Arcserve 6.5. We are experiencing incomplete backups on several servers because Arcserve cannot open ntuser.dat and ntuser.dat.log. If we logon as Administrator and attempt to delete these files we receive a message that it cannot be deleted be...
  2. Limit Number of Lines in Notepad
    I want to limit the lines of a notepad to 1000 lines. For example if a notepad is opened in append mode, every new entry is added to this notepad in the new line. At some point of time the total number of lines in this notepad will reach 1000. After this, what I want is that ...
  3. i messed up NTUSER.DAT >:(
    ok i need serious help right now... i was trying to make my MY PICTURES folder move to another partition and forgot about regedit and went into my ntuser.dat and changed the variable and now it is an invalid registry file or something and i cant log in to my administrator ...
  4. NTUSER.DAT Error
    Hi Guys, I know the NTUSER.DAT is the registry part of a user's profile and is applied from the ALL Users profile. Im dealing with clients with XP Pro SP2 and generally do house keeping by delelting User profiles of people who no longer work here. Today i am getting the abo...
  5. NTUSER.Dat Locked By System Process
    We have just implemented a terminal server for a company. At the moment they have arround 15 users running without any issues. One user is having a issue which we are currently finding it impossible to correct. Every morning when he logs on his roaming profile is not loaded, ...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: SheharyaarSaahilPosted on 2004-11-17 at 06:47:07ID: 12604461

Hello jonnyz0109 =)

Use this tool >> http://www.sysinternals.com/ntw2k/freeware/procexp.shtml

 

by: SheharyaarSaahilPosted on 2004-11-17 at 06:47:50ID: 12604468

You may also try this method,

Delete A File That Is Seemingly "Undeletable"
http://www.theeldergeek.com/delete_undeletable_file.htm

 

by: stevenlewisPosted on 2004-11-17 at 06:48:45ID: 12604481

try this utility to see what has it locked
http://www.dr-hoiby.com/WhoLockMe/

 

by: jonnyz0109Posted on 2004-11-17 at 06:49:03ID: 12604488

Hey Shehar  :o)   You are quick

I will check these out and get right back to you.

 

by: SheharyaarSaahilPosted on 2004-11-17 at 06:50:30ID: 12604507

sure no problem,,, the most possible doubt is that Explorer has locked those files and using the theeldergreek method, you should be able to delete those undeleteable files :)

 

by: jonnyz0109Posted on 2004-11-17 at 06:54:47ID: 12604556

It's in use by explorer...

 

by: jonnyz0109Posted on 2004-11-17 at 06:55:22ID: 12604566

>>using the theeldergreek method, you should be able to delete those undeleteable files

Gonna check it out now.

 

by: SheharyaarSaahilPosted on 2004-11-17 at 06:56:09ID: 12604578

hmmmmmm ok :)

 

by: jonnyz0109Posted on 2004-11-17 at 06:57:36ID: 12604599

Closing explorer and reopening did not unlock the file.  But let me clean this up and replicate the problem cleanly... I've been trying all sorts of things and testing and haven't restarted in a while.

 

by: SheharyaarSaahilPosted on 2004-11-17 at 06:59:23ID: 12604621

hey are you trying to delete them in safemode na ??

 

by: jonnyz0109Posted on 2004-11-17 at 07:11:42ID: 12604769

No... I guess a little background is in order.  We use Novell to delete the local roaming profile from the workstation hard drive after the user's profile is loaded up to the server.  Novell starts to delete the profile but hits the locked files and gives up.  Now I'm left with no profiles registered in windows, but a partial profile folder in the Docs and Settings area.  Now the next time the student logs in, Windows sees the folder and decides it can' overwrite a profile folder, so it adds ".000" to the end... and basically that just starts screwing things up.

I just replicated the problem cleanly and closing explorer did not help.  I even tried deleting the file from a command prompt while explorer was not running, and it still reported being in use.  I'll run the above utility again and see if I can find somethine else using the file...

~ Jonny

 

by: jonnyz0109Posted on 2004-11-17 at 07:17:47ID: 12604853

The root of "system" - using:

C:\Documents and Settings\8averykevin\ntuser.dat
C:\Documents and Settings\8averykevin\NTUSER.DAT.LOG

Can I close this thread/process without screwing my windows session over?  My goal is to allow the student to log off without having to restart in order to restore functionality...

 

by: stevenlewisPosted on 2004-11-17 at 07:23:34ID: 12604934

I'm pretty sure you will be "screwing my windows session over", but give it a shot

 

by: jonnyz0109Posted on 2004-11-17 at 07:37:04ID: 12605101

hehe yeh I think I just made Windows have a heart attack  :o)

So now the question is why is it in use by "System" and how can I fix that?  Do services run under this single process/handle?  Is it possible that a service is not closing properly?  Not putting things back the way they should?  There is an autocad service, I haven't narrowed it down to this service running or not, because when autocad is launched there are plenty of different proceses that run...

Just kind of thinking out loud here.  Any ideas guys?

 

by: stevenlewisPosted on 2004-11-17 at 07:49:36ID: 12605233

here's an idea, create a batch file to delete these files
and then see
AutoExNT Service allows you to start a batch file, Autoexnt.bat, at boot time without having to log onto the computer on which it will run.

http://www.dynawell.com/support/ResKit/win2k.asp
then when the student logs on, the folder(s) should be gone

 

by: SheharyaarSaahilPosted on 2004-11-17 at 07:53:32ID: 12605272

hmmmmmm novell... i have never used it, so dont have any idea that if you cannot use safemode or safemode with command prompt for deleting the profile files present on the hard drive.... mostly when we cannot delete the files in GUI interface, we use safemode with command prompt to delete the files from the hard drive as in command prompt there is no possibility of background process or services :)

 

by: stevenlewisPosted on 2004-11-17 at 07:56:36ID: 12605300

You are trying this on a test machine (I hope)

 

by: jonnyz0109Posted on 2004-11-17 at 07:57:42ID: 12605318

of course.... that's what makes this so difficult to solve.... which is why I've posted it here!  :o)

 

by: jonnyz0109Posted on 2004-11-17 at 08:10:00ID: 12605481

New question:  I have a service set to go as a specific user.  I have entered the password and everything, and it says "The account .\user has been granted the Log On As A Service right." I can then start and stop the service successfully.  But as soon as I log out and back in, it is not authenticated anymore.  The error that comes up now when I try to start the service is: Could not start the Run Autocad Licensing service on Local Computer.  Error 1069: The service did not start due to a logon failure."  If I retype in the password and try to start the service again, it works.  Why isn't it keeping the authentication information?

 

by: jonnyz0109Posted on 2004-11-17 at 08:10:57ID: 12605490

Yes it's one machine in an Autocad lab that I've designated as my test machine.  If I kill it I can just blow another clean image onto it  :o)

 

by: jonnyz0109Posted on 2004-11-17 at 08:18:08ID: 12605571

>> here's an idea, create a batch file to delete these files
and then see
AutoExNT Service allows you to start a batch file, Autoexnt.bat, at boot time without having to log onto the computer on which it will run.

We thought about that, but the problem is that if the user logs out after being the first to run autocad, his profile folder is now locked and partially there.  If he restarts and we have this batch file run on startup, then yes it can get rid of those extra files lying around.  But if the student just logs out, and the next period happens to come back and logs back in, the files will still be locked, and unable to be deleted.

Requiring a student to restart the computer would be a solution... we found that if we restart instead of logging out the files are not locked.  this is our "last resort" solution though... much rather would be able to have the students be able to log in and out without any problems.

 

by: jonnyz0109Posted on 2004-11-17 at 08:43:23ID: 12605904

OK Forget everything up to this point.  Take a look at this.

Autocad uses a licensing service, which runs when autocad runs, and it doesn't do a good job of cleaning up.  Here is my problem now:

If I am logged into the computer (doesn't matter which user, I'm using Administrator as the example), and I start the service, and stop the service manually, it screws around with that Administrator profile - which is great, because now any other user can log in, log out, the service seems to work correctly with their profiles.  The service is set to run under the Local System account.

I created a batch file to run at system startup:
    echo off
    net start "Run Autocad Licensing"
    net stop "Run Autocad Licensing"

Now, i'm assuming, because I wasn't physically logged into any profiles, it didn't lock anything up.  The next time I ran the service in a user account, the files were locked and again not deleted.

So my question is: what is the difference between running this service as Local System while I am logged in as Administrator, as opposed to running the same service from the same batch file before anyone has logged in?

~ Jonny

 

by: jonnyz0109Posted on 2004-11-17 at 08:43:34ID: 12605908

500 Points...

 

by: stevenlewisPosted on 2004-11-17 at 08:48:27ID: 12605967

>> what is the difference between running this service as Local System while I am logged in as Administrator, as opposed to running the same service from the same batch file before anyone has logged in
this is just a guess, but I think it may have to do with some services starting when a user logs on

 

by: stevenlewisPosted on 2004-11-17 at 08:49:45ID: 12605978

BTW, the points don't mean much, so don't worry about them

 

by: jonnyz0109Posted on 2004-11-17 at 09:33:51ID: 12606413

Hoping that 500 points may attract more to look into the problem and for you guys to keep at it!

>> this is just a guess, but I think it may have to do with some services starting when a user logs on

OK, well that batch file ran automatically as soon as the system started up, before I logged in as any users.  Is there anywhere I can see that the service started and stopped appropriately?  Like a log or something?

 

by: jonnyz0109Posted on 2004-11-17 at 09:35:51ID: 12606430

What I'm saying is the service SHOULD have started and stopped before anyone logged in, controlled by that batch file (which DID run, according to the Scheduled Tasks area).  But is there a way of knowing for sure that the service DID in fact start successfully, then stop again?

~ Jonny

 

by: stevenlewisPosted on 2004-11-17 at 09:40:12ID: 12606463

in the services msc, you can set a program to run if the service fails to start
so have it run a program, and let the "program" create a batch file
you can do this for first, second and subsequent failures

 

by: tymesPosted on 2004-11-17 at 13:01:50ID: 12608642

So your problem is that this service runs as the user and so the users' settings are in use?  

First, you might create a new account that you don't need to move or delete or whatever (perhaps a local account) and run the service as that (edit the service and have it run as the local administrator).

You might also stop the service when people log on and stop it when they log off (or even when they start the program that needs the service and stop it when the program ends).  

This is autocad licensing so look into setting up a network service and move it off the desktops, you might have to pay more but perhaps you can run the licensed program on more desktops (even in remote locations that are still attached to the network).

You can add the following to the Script to debug.  The script may be running as an account that doesn't have permissions to start and stop services so you can run the script later as the same user.  
ECHO Restarting Service as %username%  >>C:\debug-acadl-logfile.txt

I also quickly considered adjusting the script so it used RUNAS /user:admin "net stop.." or you might actually need to use PSEXEC from wininternals to use a runas with a password in a script file.

 

by: jonnyz0109Posted on 2004-11-17 at 14:31:18ID: 12609526

Tymes... so many of these suggestions have gone through my head, some I have played with, others I did not know where to start.  If you could please continue watching this thread, I will be picking up again first thing in the morning (sigh...) and will start checking these things out.

About creating the log file: I spent roughly 45 minutes just searching for that.  I can't believe it is that simple and googling didn't find anything.  I am very interested to see if those services did indeed start.  The batch file ran, but I dont think I have any way of seeing if the services failed or not.. so I figured maybe I can work on making a log.  Either that or would it be in the event viewer?  Forgot about that until just now...

Until tomorrow, have a good evening guys.

~ Jonny

 

by: tymesPosted on 2004-11-17 at 18:25:15ID: 12610819

to also append the status of the service to the log file add a

SC QUERY "Run Autocad Licensing" >>C:\debug-acadl-logfile.txt

looking at this example you'll see my spooler is running (so I have to go catch it)
SC QUERY spooler

SERVICE_NAME: spooler
        TYPE               : 110  WIN32_OWN_PROCESS (interactive)
        STATE              : 4  RUNNING
                                (STOPPABLE,NOT_PAUSABLE,ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

 

by: jonnyz0109Posted on 2004-11-18 at 07:12:05ID: 12615123

How can I write custom text to this log, so I can follow the entire process all the way through?

For instance I'd like to see in the log...
Batch Started
Starting Service
[Query Service]
Stopping Service
[Query Service]
Batch Ending

Also, how are is it to get timestamps?

Thanks for your help.  I'm in the lab working on this now so hopefully I will figure some things out.

~ Jonny

 

by: jonnyz0109Posted on 2004-11-18 at 07:21:13ID: 12615221

"looking at this example you'll see my spooler is running (so I have to go catch it)"
heh heh heh...

 

by: jonnyz0109Posted on 2004-11-18 at 08:11:59ID: 12615847

Also, any way to write all the output to a file.... like if I have echo on, everything that comes through would be saved to the log file?

 

by: jonnyz0109Posted on 2004-11-18 at 08:32:58ID: 12616087

OK I'm back to having the batch file run at system startup.  Sometimes it starts, sometimes it doesnt.  The first time I tested, it started, worked, had the 3 entries in the log (i'll post my batch code below), and the problem was actually solved.  Figured I should restart and log in directly as a student, but this time when I logged back in as administrator, I saw that the event had "failed to start."  Why?  Where can I see why it is failing?  Does it matter who I log in as?  Shouldn't it run the event (and the batch file) as the person whose credentials I entered (I used administrator account) even if no one logs in???

Batch file:

echo off
sc query "Run Autocad Licensing" >>C:\acad.log
net start "Run Autocad Licensing"
sc query "Run Autocad Licensing" >>C:\acad.log
net stop "Run Autocad Licensing"
sc query "Run Autocad Licensing" >>C:\acad.log

 

by: jonnyz0109Posted on 2004-11-18 at 08:34:15ID: 12616105

It failed to start which means the batch file didn't even run... so forget about the batch file not working... it's not even running every time I start up.  What am I doing wrong?  Should I run the batch file as an automatic service on system startup?  (I have instsrv and srvany)

 

by: tymesPosted on 2004-11-18 at 10:22:00ID: 12617271

So how did you set this system startup batfile to run?  In the Program start folder?  Right click on the shortcut and change the permissions to RUN AS the administrator (remember to restrict the write/modify permissons on the batfile that you run as an administrator).  Or did you make it a scheduled event that starts when the computer starts or when the person logs on?  Make it a scheduled task might help you.

Adding "ECHO %TIME% %USERNAME% >> C:\acad.log" would tell you who the script was running as.

 

by: jonnyz0109Posted on 2004-11-18 at 10:55:59ID: 12617629

I have it scheduled to run as a scheduled task at system startup... the first time it worked and ran, the second time the task "failed to start..."

I'll try doing some logging with that information.

 

by: jonnyz0109Posted on 2004-11-18 at 12:49:22ID: 12618701

It seems like this stupid service is just plain poorly written.

As I said, if I start and stop the service manually in the ./user profile, then it will lock up just that profile, leaving other users to turn on and off the service as needed, without locking their profiles.

What I ended up doing in place of scheduled events was to link my batch file into a new Automatic Service, running itself as the ./user account (which has administrative rights).  It ran, and I did figure out how to log everything, so I see that everything ran properly.  I logged in as a student, ran autocad (thus starting this service) and then logged back out, only to find that the studen't profile was locked... again!

Autocad is of no help, as they claim it is a problem with our setup, as opposed to with their service.  I am completely out of ideas.  This question is worth 500 points, because I really have no further ideas.

Something to keep in mind: *logging out* after using autocad for the first time since booting the computer keeps some files in the user's profile open, thus locking it.  Bypassing log out and directly *restarting or shutting down* after using autocad for the first time since booting the computer releases those files, and our Novell does its job completely, bringing the roaming profile up to the server, and then deleting the profile and its files from the local system.

I am about to tell the students to just restart every time they want to log off... this is such a mess :(

PLEASE, if you have any ideas at all, let me know.

~ Jonny

 

by: stevenlewisPosted on 2004-11-18 at 15:19:17ID: 12620339

>> have it scheduled to run as a scheduled task at system startup... the first time it worked and ran, the second time the task "failed to start
the second time, was that aafter a restart or a log off?

 

by: jonnyz0109Posted on 2004-11-18 at 16:01:08ID: 12620587

After a restart.  And I'm not using that anymore, since I seemingly couldn't get it to remember the 'user' account's password... guess it has a bad memory.  If you look above, you will see that I made the batch file run as an automatic service, and the service is running under the 'user' account.

Does that clear it up?

Thanks

 

by: jonnyz0109Posted on 2004-11-23 at 09:19:21ID: 12657101

This is still unsolved.  Autodesk is of no help, nor did posting on the user forums on their site help.  I have posted a new question to see if I can get a workaround - restart the computers and delete the access profile folders once a week, night, whatever we need to do.  The question can be found here: http://www.experts-exchange.com/Operating_Systems/WinXP/Q_21217614.html.

If you don't mind, I am going to leave this question open for a while.  It is an issue that ultimately needs to be solved.  If after a week or two we can't find anything, I will ask that the question be PAQ'd and give out some points for those that at least got me closer to the solution.  Does this sound fair?

Thanks,
Jonny

 

by: stevenlewisPosted on 2004-11-23 at 09:33:57ID: 12657266

Sounds good to me Jonny, I'm out of ideas :-(

 

by: tymesPosted on 2004-11-23 at 11:52:44ID: 12658671

If this value is enabled After a user logs off from an interactive session, the locally cached version of the roaming User Profile is deleted.

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon
DeleteRoamingCache REG_DWORD 0=Off or value is removed; 1= On.


To do something manually, use DELPROF.EXE in the windows resource Kit.  You can have it delete profiles that haven't been used in a specific number of days...

DELPROF.EXE /q /i /d:5
quite, ignore errors, profiles 5 days old.

 

by: jonnyz0109Posted on 2004-11-23 at 12:21:25ID: 12658993

Checking it out...

 

by: jonnyz0109Posted on 2004-11-23 at 12:34:56ID: 12659123

Didn't work :(  Worth a shot though.  The problem here is that Novell is removing the roaming profiles already, this isn't technically a roaming profile "cache"... For instance if I pick any given computer in this particular lab, there are a bunch of profile folders left over in C:\documents and settings, all from users launching autocad after a restart.  But, if I go into Users and Groups under Comp Management, or even under Profile Information under System preferences, only the 2 local users show up (Administrator and User).  This is because Novell successfully removes the profile from windows, but while trying to remove the user's files, when it hits the locked file, it just gives up on deleting the rest of that profile folder.  Now I'm left with a non-user profile folder (like, it's not bound to any users... it's as if you had just created a new folder in Documents and Settings and stuck a bunch of files in there), and the next time that user logs in, Windows creates a new folder and calls it username.000.

Just typing that gave me an idea.  By default, windows will not overwrite profile folders in Docs and Settings.  For instance, let's say I have a new user named "Joe" but have not logged him in yet, and I go create a folder called "joe" in C:\Documents and Settings.  Now when I log him in for the first time, Windows will not overwrite the folder that is already there, nor will it just incorporate whatever is in that folder into the profile... instead it makes a new folder called "joe.000" (I have also seen username.computername or username.windows, but windows seems to favor the .000 in our case).  Can I somehow tell windows to just use the folder that is already there?  So even if I already have "joe" in there it just overwrites the old files with those from the profile.

~ Jonny

 

by: jonnyz0109Posted on 2004-12-13 at 13:45:20ID: 12813654

Tymes,

How might I do two things if an IF statement comes out to meet the conditions?

If [condition] [command 1] [command 2]

Looking for logging puposes so I know which directories are being deleted.  It's nice to know that the script is running when it's supposed to, but I just want to be able to go into my log and see that a bunch of folders were deleted too.

Thanks

 

by: jonnyz0109Posted on 2004-12-24 at 08:33:57ID: 12899503

Well guys I am going to ask that this question be paq'd and points refunded.  The issue was definately with the Autocad service, and Autodesk is not willing to admit that.  Our solution was to get rid of any lingering profiles every time the computer starts up.  See my other question which has since been closed for more information: ttp://www.experts-exchange.com/Operating_Systems/WinXP/Q_21217614.html

I Plan on giving out points to those who did help over here.  I just don't think I should accept anything as an "answer" in this question as apparently there is none, or that Autodesk just threw that service out there without full testing.

Thanks again for everyone's help.

~ Jonny

 

by: stevenlewisPosted on 2004-12-24 at 13:51:06ID: 12900108

Cool by me :-)

 

by: moduloPosted on 2004-12-28 at 05:34:59ID: 12912066

Closed, 500 points refunded.

modulo
Community Support Moderator
Experts Exchange

 

by: jonnyz0109Posted on 2004-12-28 at 07:20:03ID: 12912657

Tymes & Steven - please post in the following question so I can give you some points for helping out here.  Thanks again!

 

by: jonnyz0109Posted on 2004-12-28 at 07:20:31ID: 12912661

 

by: jonnyz0109Posted on 2005-01-01 at 10:59:37ID: 12936594

Still waiting for Tymes...

 

by: hpelgatoPosted on 2005-01-24 at 18:20:01ID: 13128078

well, if those web pages doesn't work, just star on "safe mode", restar ur system, so when boot press f8 on keyboard several times until the screen shoes boot screen, then select "safe mode"... when windows stars, try to delete the files u need selectin' those files and press "SHIFT+SUPR"... that's all! good luck

HP

 

by: colinukPosted on 2005-01-25 at 18:50:39ID: 13138699

Download Moveon boot.

http://www.gibinsoft.net/gipoutils/fileutil/rightview.htm

30 day trial, just locate the file/s reboot files gone.

colin.

 

by: tymesPosted on 2005-01-30 at 23:41:53ID: 13180602

in regards to your question pertain to IF statements in bat file sy
if "%var%"=="2" (
  rem do this stuff
) else (
  rem do other stuff
)

so
if 1==1 (echo yes) else (echo no)
will say yes
if 1==2 (echo yes) else (echo no)
will say no

Rather than deleting files, you might try renaming them and deleting them a iteration later.
del %userprofile%\*.former         && rem del files from a while back.
ren %userprofile%\*.* *.former   && rem rename existing files that may be in use
sometimes you can't delete inuse files but you can rename them.

 

by: joykennedyhPosted on 2010-01-08 at 08:59:33ID: 26211534

I WAS successful in deleting NTUSER.dat -- Windows XP Professional w/SP3.  I started the PC in safe mode, logged in as administrator, and deleted the entire directory for the users that had the NTUSER.dat file.  I had tried MOST of the suggestions posted, and logging in as Administrator in SAFE MODE was the ONLY SOLUTION to get rid of the UNRULY NTUSER.dat file.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...