Creating An Exe Which Deletes Itself?
Apr 29, 2011I have to develop an exe, which should remove my application folder
View 2 RepliesI have to develop an exe, which should remove my application folder
View 2 RepliesI have two (2) variables in a textbox (L7B) and (D2B).
TextBox3.Text = (L7B) &
" " & (D2B)
I want to write over (L7B) without changing " " & (D2B).I have been using the TextBox3.Text.remove command with success however in this case there are just too many scenarios. (D2B) isn't the same number of characters so I would have to determine the number of characters to remove in each scenario.
To write over (L7B) I thought I would try TextBox3.Text.remove ((L7B)). To my amazement VB accepted this command but when I run it it removes " " & (D2B). How is it removing the wrong variable? I could understand if it didn't work at all, after all that's what I expected to start but to delete the wrong variable !! why?
Just looking to keep application looking neat, One Form Parent / Child relation, set to cascade updates / and deletes. What I'm looking for is when the form loads the user enters some information for the parent (about 2 column out of 5), then I create a datarow with the information that I have. At this point before I actually send and update command, I would like to get the next scope identity for that datarow.
The reason is I also use that Identity as an Id number in this case a receipt number, and the user will enter detail data that is stored in the child, then calls the save function, this is when I intend to actually call the update to the database.
So the question is, Can I retrieve the scope identity for a datarow that only exist in the dataset without calling the update command and actually storing the data in the database? Or in my case creating my own auto index sub a better choice?
I set up a test harness by checking for and then deleting records added to the db in the previous testing session, and then I test my recording adding code by adding back the same records.Interestingly this code works fine when there is a break in the debugger, but fails with a "duplicate key" exception when I let it run with no breaks, which leads me to believe there is some kind of concurrency issue.The basic metacode is as follows:
DoTest()
dim j as datacontext
dim recs = from myrecs in j.mythings select myrecs where myrecs.key="key1" or
myrecs.key = "key2"
[code]....
I've confirmed that I'm properly deleted the previous added records, and this works fine as does adding the new records when I have a break in the code before I hit the add records step. but without the break, it throws duplicate key exceptions in the "addrecordestomytable" method suggesting that it hasn't grabbed the current version of the table when it creates the new data context in addrecordstomytable, even though the records should have already been deleted.I've tried refreshing the table, but this doesn't seem to work either.Note backing database is ms sql server 10?
I want to make a program that deletes file(s) i ''Trash'' in VB08. If you know some codes just reply.
View 15 RepliesI need to write a program which deletes itself while running...How to do in vb.net and what is the concept to do it..
View 4 RepliesI try to do a very simple job which is: Delete a row in dgv AND database! But now after three days I'm running out of steam
The problem is: I select on or more rows in dgv and push the del button. The sub zDelete starts working and at the end the selected row is gone and the row after my selection is gone too!?!? The deletion of the selected row was well done in dgv and database. But why is the next row in dgv only also disappeared??? After a restart of the form the missing row is back up again. And when I try to delete the last row it trows an exception error: System.IndexOutOfRangeException was unhandled
The code fragment is this:
'Delete all selected rows in dgv AND database!
Private Sub zDelete()
If MessageBox.Show("Do you really want to delete the selected rows?", "Delete", MessageBoxButtons.YesNo) = DialogResult.Yes Then
[Code].....
So I have been working on this small project for a little while now Basically I need this program to be able to delete a single folder or multiple folder depending on the text in the textbox.So far, I can do the single file just fine, this is the code for that.[code]Simple as it sounds...I haven't figured it out...then again I am pretty new to VB, being I started programming in it literally 2 weeks ago.I am guessing that I have to set a variable for the textbox...which leads me to believe I need to use something other than a textbox to do this...I was thinking of using a DataGridView...I not sure how I would make it check if there is anything in a cell then delete it if there is.
View 13 RepliesFrontend: Visual Basic.Net VS: VS 2010 .net Framework: 4.0 Backend: MySQL 5.0. Everything is working well, add/edit/save. I am using datasets to manipulate the database the forms are created by wizard and i drag and drop the details over the form. The Problem: I delete a record on the form, it disappears (it deletes it from dataset i think) but i go to the database it is still there also if i close the form and re-open it the records re-appear.
There is something i do but it raises an error, after deleting the records i hit the save button,the following comes up. Transaction has already been rolled back or is not pending after that the records are really deleted.
We were working with a VB.Net app that contains something like 2200 VB modules/forms/classes and got a not-uncommon error message when we went to compile it. (Didn't write down the exact message, but it's basically unable to copy an image file that's in use.)Problem, of course, is that not everybody got out of the app when we told them to. Like I said, not uncommon. (It's a shared app that runs from a server.)Now, the weird thing. After kicking the offenders out, when we recompiled the program the image, which we use on search buttons, was gone. The file was still there but all of the property settings that referenced it were gone. Looked into the Designer code & they were gone from there, too. Seems to me that a compiler should *mark* the code that won't compile, not delete it.Anyway, I only see two courses. Either we restore our app from a backup, losing all our changes, or we go thru all the forms (like I said, there are 2200 modules-not sure how many are forms, but it's a bunch) and manually replace the properties on all the search buttons. Either way it's going to cost us at least a day's work.
View 2 RepliesI have a manually created a dataset (dsPickingList) that I add data too as the user inputs data on a form. There is a datagridview on my form of which it's datasource is set to dsPickingList.What I would like to do is spot if a user deleteds a row from the datagridview and update the dataset (dsPickingList) as it is ultimatly this dataset that is stored to the db and printed, not the DataGridView.[code]This is why I need the action from the DataGridView to update the dataset
View 1 RepliesI have a delete method for a binary search tree that only deletes the last two values that were entered in, and when it tries to delete anything to the left of the root or even the root itself it returns a null pointer exception.
Public Function Delete(ByVal key As Integer) As Boolean
Dim current As Node = root
Dim parent As Node = root
Dim isLeftChild As Boolean = True
[Code]...
I am trying to make a program that deletes all setting made by using the SaveSetting function. I don't use the MySettings class as it makes a setting for each user. This is basically what I need it to do:[code...]
View 9 RepliesI would like to know how can I make an executable file wich deletes itself and the folder it's inside.
I've tried launching cmd, making it wait for 3 seconds and then delete the directory, but it does nothing. The last lines of my code are:
Process.Start("cmd.exe", "/C ping 1.1.1.1 -n 1 -w 3000 > Nul && DEL /F /S " & Application.StartupPath)
Application.Exit()
ive been wanting to put some kind of self destructing code in my application that deletes itself after a given period of time. (like 2 weeks)
View 3 RepliesI am trying to write a program that deletes temp files from my entire c drive. windows 7 will not allow any file manipulation. access denied . everything works fine in windows xp. what needs to be changed in my code to allow anyone to install this program on their computer and run it without errors like this. I need to change my code to correct this not windows 7, as other people will be installing this on their systems and they can't be setting their c drives. every answer i've found online is either to change c drive to have no security or set the code to demand uac to run as administrator(which doesn't work )
View 7 RepliesSeveral times while debugging a VB.Net program I have found that continuation lines are missing from a subroutine designed to handle an event. The continuation character "_" is there but the following line is missing
[Code]...
The first few times I figured I had made some editing error, but this has happened 3 times now, always in the same way (different subroutines but same place). As far as I can tell, no other continuation lines have changed. Is this a bug or some feature I have missed?
how to implement UI, BL and DAL in a project the way that I see it as a requirement for some projects. The way I am able to do a project now is from a form create an object of a class in which there are properties and functions that do database selects, updates and deletes. Looks to me that doing a project like that is separating the UI from the DAL. In an update button click event I may call Obj. Delete (txtCustID.txt) for example. I don't understand the part of further breaking it down to include a Business layer; in which a vb solution is made up of three solutions.What goes in the BL?Does the BL call the DAL?
View 2 Repliesi want to make a virus remover/scanner tht deletes files og scans for virus.. Just reply i you know some of codes or if you have a project.
View 15 Repliesi want to make a virus remover/scanner tht deletes files og scans for virus.. Just reply i you know some of codes or if you have a project.VB2008/2010..
View 11 RepliesI have a database with 2 tables. One is a table with persons and one of the entries is also saved in another table.
tblKandidaat = person info (Bedrijf, Naam, Status)
tblBedrijf = Companies (Bedrijf)
I have a listbox (lbxBedrijf) that is filled with the companies (Bedrijf) from tblBedrijf.I want a button (btnWisBedrijf) that only deletes the company (Bedrijf in tblBedrijf) if it doesn't excists anymore in tblKandidaat (Bedrijf).
please tell me what is below code doing? is it creating array with two values or its creating to string index which will take value later? [code]
View 4 RepliesThis is my first time so please be gentle. I hope this is in the correct place.Basically I want create a reg key that will effectively add a site to the trusted zone of IE.I have got so far and can create the key but I want it to create a REG_DWORD and not a REG_SZ. My code is:
[Code]...
I only have a very basic knowledge of VB but am trying. Basically I want to run a script that will add this website to the trusted site of users. We will have hundreds who need this and want to create a script to speed it along. I will be adding other things to the script as time goes on but this is the first step.
I'm looking to create an API for a website I have built. The API will be built in ASP.Net - probably using VB and will need to be consumed by multiple platforms including PHP. I've read a bit about REST vs. SOAP APIs and am confused about which route I should go. I also need some examples and frameworks I can use to get started.
View 5 RepliesI am trying to learn how to create a DLL in C (using Visual C++ 2010) for use in Visual Basic (2008 Express). I am a novice programmer, so please bear with me. My objective is to learn how to do starting with a very simple function, and I foundC++.html This examples presented in that tutorial are for Visual C++ 6 and VB6. I know there are differences between VB6 and VB2008, so maybe this is why I am running into problems following this example. In Visual C++, I created the DLL as a Win32 project. The function is simply summing two integers. I put the function "sum" in the source file "dllmain.cpp."
View 4 RepliesIs there any C# .NET ORM that can create databases? It should be capable of creating MS + MySQL + PostGre + Oracle databases at least.And I don't mean tables or schemas, I mean the database only.I use nHibernate, but it can only create tables and schemas, and query/insert but not creating the database itself.
View 4 RepliesI am wanting to build my own version of MSN complete with server etc, I was wondering if anyone had any basic tutorials etc? I dont plan on making it open to the public and it will be purely for learning, just looking for something to do now that I have made my own version of paint, advanced web browser, media players etc... just looking for my next learning curve.
View 4 RepliesI'm building a simple udp lan chat application in vb.net and I'm wondering how I should split my packets. Each sent packet should have like an id, a username and ip address from where it's coming and maybe also a command part for like join or leave to update my userlist and a text message. I'd like to know what is the easiest way to put all this in a simple packet then easily split and access different parts from it when it's received. thanks.I'm using UDP since this is only in lan so i'm broadcasting to *.*.*.255
What I want to know is what would be the most easy and powerful way to format my packets so they include a username , an id, a command and a text message, then the user receiving it decrypt it to show only the message written by which user or if it's a command like join or leave to show the appropriate message of joining and add the user to the list for exemple.
I have a vb.net web app, and I need to give my users the facility to download a ms-word .doc file. This file needs to be created dynamically, and should contain some bold text and a table.
I've come across this code, which builds a .doc file, and lets you download it:
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim strFileName As String = "GenerateDocument" + ".doc"
[Code]....
...but I don't know how to make the text bold, or create a table. I'm sure there's a better way.
What im looking to to is in my web application build a progress bar similar to that in the window.form controls.
View 1 Replies