CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2010
    Posts
    4

    Question Overwrite / Replace a Locked File

    Hello again!
    I am wondering how I can replace a file locked by another application.
    I am using VB.NET from 2008.
    Any help is greatly appreciated.
    Thank you!

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Overwrite / Replace a Locked File

    What program would that be? And WHY do you want to terminate it? We don't help with anything not legit...
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Jun 2010
    Posts
    4

    Re: Overwrite / Replace a Locked File

    I don't want to terminate the application, simply replace a file that the application is using.
    I am trying to implement a program with the Sims 2 that switches a custom CAS! file (available here: http://www.modthesims.info/d/409968). It would be more useful if it could switch the file without restarting the Sims, but every file that is in the Sims 2 Downloads directory is locked even if it is not being used.

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Overwrite / Replace a Locked File

    That would be their anti-cheat engine... Sorry, we can't help with that
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Overwrite / Replace a Locked File

    The program is not going to read the new file even if you were able to replace it while the program is running which you will not be able to do since it is currently in use.

    If by some chance you were able to find a way to replace the file while the program was running the most likely result would be to crash the Sims program.

    Besides that why would you even need to switch this screen on the fly. All it is is a background image
    Always use [code][/code] tags when posting code.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured