The Main app checks if it's the right version with a webservice. If it's not, it will start the updater.
The updater will check if the main app is still running. If it is, it kills the process. After that it overwrites all the files in the main app folder with new ones.
The problem is, when the main app is using a file and it's killed by the updater. The file that the main app was using isn't cleared at once, this apparantly takes some time.
So when the updater wants to overwrite the file, the file is still in use. I could keep the updater waiting for a minute after it kills the process but this is of course quite error prone.
Is it possible to ignore the file in use thing and overwrite it anyway?
How can be find out which file is going to delete when, user provides command like DELETE or SHIFT + DELETE or by programmatically gives DELETE command. Well I know about FileSystemWatcher Class, but this class doesn't provide information before delete...
i am working on an application called logonscreenchangerxp i made my program and when i run it on xp virtualmachine i get errors the program is made using vb 2008 and using .net framework 2.0 i am not able to get full permissions to modify boot.ini file and a regisrty value and to delete a file
Below is my code for DELETE button. What i want is if the user select the transaction from the listview and press the DELETE button it must be able to delete the transaction from listview and text file(temporary log file) which i keep all the transaction record. At the same time the list view must able show the total current balance from the deleted trnsaction.
i am very new to VB. I am working on file operation such as show files, copy file, delete file, show current directory, rename folder, make folder. My problem right now is with delete and copy file. I have a method of delete and copy but i dont know how to pass this method on a button.
I am trying to code a delete button for a browsing program based on data from a txt file. I have coded the buttons to sort(ascending and descending), append to the text file, search the text file, but I can not seem to get the delete function working. I am using VB 2010, this is what I have so far:
Code: Dim deleline As String Dim line As String Dim isFound As Boolean = False sr4 = IO.File.OpenText("Students.txt")
[VB 2008 express edition] i am doing a application data grid view bound data from MS access (.mdb) as my dataset. the dataset have 5 tables, each table consist of ID, Items, Rates, And Amount, i face some problem here:
a) cannot delete row from the table, (using binding navigator but error) b) how can make a opendialog to load the .mdb file dataset table in to the datagridview? c) how do i save table in the datagridview into the MS Access file ?
I have Project i need to recovery file System . And some information who Create that file , deleting , replace , Modifying . I need also return any file delete or replace .
I encountered the error:The process cannot access the file <full file path> because it is being used by another process.during System.IO.File.Delete(filename)I have opened the file using:pctPhoto.Image = Image.FromFile(filename)before I delete the file.
i know how to do it but is this even possible in vb. get a textbox and a button.write a file path to something you want to dlete in the text box then press the button and the button deletes the object the file path has specified.and you
I have a project where you type something then it looks through a text file for what you typed. I would then like to make a way to edit the text file once I find what I'm looking for. So, how do you delete text from a .txt file that you are searching through? Also, how do you re-write in that place you just deleted the text from?
What I want, is for my text file to be read into the array named "CFiles()". Then once this is complete to delete the file But I get the error, The process cannot access the file 'C:UsersAndrewDesktopNew.txt' because it is being used by another process. On 3rd to last line. My code is below:
What I want, is for my text file to be read into the array named "CFiles()". Then once this is complete to delete the fileButI get the error, The process cannot access the file 'C:\Users\Andrew\Desktop\New.txt' because it is being used by another process. On 3rd to last line.My code is below:
Public Class Form1 Dim File As String = "C:\Users\Andrew\Desktop\New.txt" Dim CFiles() As String
I was wondering how I could delete a file that is currently in use. Well, basically the app that i'm making is an app that detects what files you download. if it detects a certain app, it trys to delete it so you can't click the 'Run' button with-in IE. But, when I try to delete it, I get the 'File is currently in-use' -exception. How could I do this? So if they download aim6.exe and my app doesn't allow it, it will delete it from the temp files so when they click run, all they get is an error like, 'Not a valid Win32 application' ...or something
I'm having a problem deleting a file. I load a TEMPORARY image in a form, show the user the image. They close the form and I attempt to delete the image but get the error that it can not be deleted because it is in use by another process. [code]...
im creating a csv file from sql querry, after that im sending this csv file with email, after i sent the mail i wanna delete the csv file but it says 'its using by another....this is my export csv function
Function ExportCsv() Dim filePath As String = "C:FULLWorkcsvlimit_dosya.csv" Dim delimiter As String = ";" Dim sb As New StringBuilder() For i As Integer = 0 To DataGridView1.Rows.Count - 1 Dim array As String() = New String(DataGridView1.Columns.Count - 1) {} If i.Equals(0) Then For j As Integer = 0 To DataGridView1.Columns.Count -
I want to read this text file and write it to another text file..Then, I want to delete the text file that has been read. But the problem is, there an error said that the file cannot be delete as it being use by another process.. Here is my code
I have a WPF form with an Image control and an Open button (among other things), and when you select a zip file (by using the Open button), it opens the zip file and extracts it to a special directory, and then takes the image from that directory (that used to be in the zip file, for the zip file contains six files, one of them being the image "bkgd.png"). I load that into the Image control on the WPF form and everything works just fine, until I decide to open a new zip file and do the same thing.When it opens a new zip file, it starts by changing the Image control's source to Nothing (in an attempt to remove my program's association with that file), and then it should be deleting all of the files in that special directory, and then extracts a new zip file and continues the process explained above.However, when I change the source to Nothing, the Image control still displays the image, and then when I try to delete the image, it states that it cannot delete the image because it is being used by another process (although the only program it was ever open in was my program, and it should not be open in my program anymore).I have tried pretty much anything I could think of, and I still can't find a way to get around this. If I can't find a solution, I cannot continue with my work.[code]
I really need to be able to delete a file on my server through Ftp and Visual Basic.<br><br>So far I know how to upload to a server but not how to delete a particular file on it.<br><br>
I have two projects in vb.net 2005, in one of them I write in a xml using: XmlTextWriter and in the second application I read the same xml file using XmlTextReader, I want to delete the file .xml later than read
I'm Having a probleme whit coping files or deleting them For exemple i want to delete a file in program file
For Deleting Files I Have That problem when i Use:
Kill(Target File) But the problem is like that (Info: the program is not running): QuoteAccess to the path 'C:\Program Files\Apple Software pdate\SoftwareUpdate.exe' is denied.
The Seconde problem thant when i want to copy a file to a directory that the file exist it gave to me a chose to replace or copy file whit other name .. I want copying fil and replacing a without showing any message
I am trying to figure out where to place a code that would cause an application to always delete a database file ONLY when being installed. However, it should not delete this file after installation I.e. when being used. I know you can use: If File.exists() Then File.delete(). But where do you place this code sothat it does not Delele the file when being run? I have tried this but it copies a new file everytime I run the application and data is lost.