Help!

Batch file to edit another one?

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Software Writers/Coders RSS
Next:  British Beers  
Author Message
JamieQ



Joined: Jul 07, 2009
Posts: 2



PostPosted: Tue Jul 07, 2009 7:59 am    Post subject: Batch file to edit another one?

Hiya.

I have a pretty nooby question here. I was wondering if it's possible to create a .bat file, that when executed, will execute the copy con command, then edit the file in question (.exe) to execute commands you write in the .bat. So written in cmd it would be something like;

copy con C:\"Some Directory"\filename.exe
/{command here}
^Z {CTRL + Z}
{Hit return}

That does the job in cmd, but how would you write that in a batch file? And is there a way to confirm; for example "Overwrite C:\filename.exe? (Yes/No/Alll)"? But without any input once the file has been run?

If that didn't make any sense, feel free to ask me more about certain parts, or to make it clearer.

Cheers.
Back to top
goretsky



Joined: Dec 07, 2002
Posts: 9041

Location: Southern California

PostPosted: Sat Jul 11, 2009 4:03 am    Post subject:

Hello,

I understand what you are asking, but I am not sure what exactly it is you are trying to accomplish. Can you describe in more detail what your goal is? Perhaps there is a different or easier way to do what you are trying to accomplish.


Regards,

Aryeh Goretsky
Back to top
JamieQ



Joined: Jul 07, 2009
Posts: 2



PostPosted: Sat Jul 11, 2009 6:17 am    Post subject: [Login to view extended thread Info.]

goretsky wrote:
Hello,

I understand what you are asking, but I am not sure what exactly it is you are trying to accomplish. Can you describe in more detail what your goal is? Perhaps there is a different or easier way to do what you are trying to accomplish.


Regards,

Aryeh Goretsky


Well, let's say for example, I want to edit a program (eg. Internet Explorer) to run commands (eg. ECHO. This is an example) when it's opened, rather than actually run the program.

Can that be written into a different .bat file, so when it's ran, it will edit that program?

Cheers.
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Software Writers/Coders All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum