how do I make it so when the form loads, it relocates the program to another directory? i have no idea how to do this any help is appreciated
Printable View
how do I make it so when the form loads, it relocates the program to another directory? i have no idea how to do this any help is appreciated
You could, but if you did, there would be no way for the program shortcut to work, plus any data files would have to be moved along with it. What are you trying to do, anyways?
i dont want a shortcut or anything, since i have a lot of problems with my computer, i dont know why, i have to reinstall windows at least once a week and format hard drive, so i usually loose all my compiled files unless i back them up to my other hard drive, and it takes to long so with this it will automatically move them for me
You want to move just one program? You would still need a backup if you had to format.
Why do you have to reformat every week? What are the symptoms that cause you to do that? Maybe you should post in the General PC forum, so we can help with that instead?
i want to add the move code to the form load of program i make so i have them all
so no one wants to help? :(
hey :wave: thats not true buddy!!!Quote:
Originally Posted by GarrettDori
why not save the project to the back-up drive directly??
I don't understand what you mean.... You want to move your EXE file when it starts? That can't be done, you can copy the EXE but moving it requires to also delete the origional file and you can't delete an EXE that is currently running.
well, it would be called replacing the application i guess, because a friend made on that does it, and when i open it, Kerio personal firewall comes up and says "Replacimg Application" but the bad thing is, my friend wont tell me how :mad:
are you sure ur friend used visual basic to do so? it may copy the file then delete the other copy to the "illusion" that it was replaced is this firewall thing part of the program?
Sound like virus technology to me... File moving itself to hide from spying eyes.
i know he used VB because thats all he knows, and he sent me a screen shot of the project with no code showing
Post the screen shot, so we can take a look at it, please.
there wouldnt be a point in posting the screen shot, its just the Visual Basic open with the form design showing
well is that firewall thing part of the program? if not maybe he shelled a specific command that "replaces the file"
Yeah, me too. That's the only reason I can think of to move an exe after it started.Quote:
Originally Posted by randem
I could provide a solution, but there is enough malware out there. I don't need this kid making a new one.
im not a "kid" i dont make "malware" [Edited by MartinLiss]
I use this firewall - ...edited...Quote:
Originally Posted by GarrettDori
The firewall uniquely identifies executables for firewall rules (block, allow, et al). If the size or date changes on an executable, the firewall no longer identifies it as the same executable, so the old rule no longer applies.
However, Kerio suggests to the user that if the filename is the same, it might be the "same" executable, but with different size and date attributes.
That is what is happenning from that message. Its replacing an identity in it's internal database for firewall rules. No executables are being moved around.
Quote:
Originally Posted by umilmi81
I hate people like that, yes it is bad to give away info that can write a virus but at the same time I don’t think that VB was written for you so that you can have info to write good programs and you can decide (by looking at one post) who is worthy to have that info and who isn’t. If you want to help out the ....."adult" then go ahead but don't sit here and say he shouldn’t be aloud to learn the code because he has every right to learn it just like you did when you were a new at VB.
I see no valid non-malicious reason for doing what was asked for, and am pleased that nobody was willing to post code which was presumably to be used for a virus or some other kind of malware. Note that it took 3 days of people not giving an answer for the poster to deny it was something of this nature, and what was said in that denial had to be modified by an Admin (presumably as it was rude).
I (like the people who posted above) have no problem with people learning, and we actively help people on a regular basis... but we dont like to see people learning potentially dangerous things with what seem to be bad intentions, as we (as well as our friends/family) are likely to be the recipients of those intentions.
If anybody wants to learn to program, there are many pieces of code on the forums (particularly in the CodeBank and UtilityBank forums) that are good to learn from, or they can start a new (non-malicous) project from scratch and ask for help when they get stuck. Like many others here, I don't want to help people cause problems for others.
As this thread is several months old, and the poster has been banned, I am now closing this thread.