-=PCTechTalk=- Re: How to write batch file

  • From: DavisUnit <davist@xxxxxxxxxxx>
  • To: pctechtalk@xxxxxxxxxxxxx
  • Date: Wed, 20 Aug 2003 18:31:07 -0300

stormy1@xxxxxxx wrote:

>Can someone tell me how to write a batch file? 
>
>Has to be run from windows desktop (on win98se) so has to bring up the command 
>prompt, change dir to c:\windows\system , delete 2 files, copy same nameed 2 
>files from d:\ back to c:\windows\system then run two regsvr commands from 
>commant prompt to un-register and then re-register some ocx files. I am sick & 
>tired of getting out the instructions and having to go do this "fix" everytime 
>a customer installs a new program (it mucks up another one and the fix is to 
>run this series of commands). 
>
>I know it can't be too hard....can it?
>
>Thanks,
>~Lacey~
>
You can write the batch file in notepad, but instead of it being a *.txt 
file, you would rename it to a *.bat
To do what you want, the contents of the file would be like so:

c:
cd\windows\system
del file1
del file2
copy d:\file1 c:
copy d:\file2 c:
regsvr32 unregistercommand1
regsvr32 unregistercommand2
regsvr32 registercommand1
regsvr32 registercommand2

Terry

>
>
>To unsub or change your email settings:
>//www.freelists.org/webpage/pctechtalk
>
>To access our Archives:
>http://groups.yahoo.com/group/PCTechTalk/messages/
>//www.freelists.org/archives/pctechtalk/
>
>For more info:
>//www.freelists.org/cgi-bin/list?list_id=pctechtalk
>
>
>  
>


To unsub or change your email settings:
//www.freelists.org/webpage/pctechtalk

To access our Archives:
http://groups.yahoo.com/group/PCTechTalk/messages/
//www.freelists.org/archives/pctechtalk/

For more info:
//www.freelists.org/cgi-bin/list?list_id=pctechtalk

Other related posts: