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

  • From: DavisUnit <davist@xxxxxxxxxxx>
  • To: pctechtalk@xxxxxxxxxxxxx
  • Date: Thu, 21 Aug 2003 11:04:35 -0300

Lacey wrote:

>ok so how does this look? (DIR??) is something I have to find out when I am
>at their site
>if I have this .bat file on the desktop (win98) and they double click on it
>will it automatically open a command prompt window?
>
>Also the machine has to be rebooted after this sequence -- can I put a text
>message in like "please reboot your machine"
>
>cd system
>del comctl32.ocx
>del comdlg32.ocx
>copy d:\DIR???\comctl32.ocx c:\windows\system
>copy d:\DIR???\comdlg32.ocs c:\windows\system
>regsvr32 /u comdlg32.ocx
>regsvr32 /u comctl32.ocx
>regsvr32 comdlg32.ocx
>regsvr32 comctl32.ocx
>  
>
Do it like so:
----------------------
c:
cd\windows\system
del comctl32.ocx
del comdlg32.ocx
copy d:\DIR???\comctl32.ocx c:\windows\system
copy d:\DIR???\comdlg32.ocs c:\windows\system
regsvr32 /u comdlg32.ocx
regsvr32 /u comctl32.ocx
regsvr32 comdlg32.ocx
regsvr32 comctl32.ocx
echo.
echo That's it boys and girls, please reboot your machine now.
--------------------------

You don't need those dashes, just there to show contents of .bat file.
Yes, the .bat file can be located on the desktop, and while it is 
running, you will see a command prompt window open, but closes when 
complete.
It would have to be rewritten to reflect the "DIR??" part....hopefully 
that is a common location on all machines, so once you determine the 
folder, tweak the .bat file and then won't have to worry about future 
changes.

Terry

>----- Original Message ----- 
>From: "DavisUnit" <davist@xxxxxxxxxxx>
>To: <pctechtalk@xxxxxxxxxxxxx>
>Sent: Wednesday, August 20, 2003 5:17 PM
>Subject: -=PCTechTalk=- Re: How to write batch file
>
>
>  
>
>>Lacey wrote:
>>
>>    
>>
>>>well when I'm doing it manually I put in the command and then press
>>>      
>>>
>enter,
>  
>
>>>then it takes a few seconds then returns a message "filexxxx unregistered
>>>successfully" and you have to press enter again...
>>>
>>>
>>>      
>>>
>>ahhh, well I just tried a sample .bat file here myself, and it will
>>pause automatically for you until you click OK, then it will proceed to
>>next line.
>>
>>Terry
>>
>>    
>>
>>>----- Original Message ----- 
>>>From: "DavisUnit" <davist@xxxxxxxxxxx>
>>>To: <pctechtalk@xxxxxxxxxxxxx>
>>>Sent: Wednesday, August 20, 2003 4:46 PM
>>>Subject: -=PCTechTalk=- Re: How to write batch file
>>>
>>>
>>>
>>>
>>>      
>>>
>>>>stormy1@xxxxxxx wrote:
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>okay I figured it must be something like that. How do I deal with
>>>>>          
>>>>>
>having
>  
>
>>>>>          
>>>>>
>>>to press "Enter" after each regsvr32 and regsvr32 /u command before I can
>>>proceed to the next one?
>>>
>>>
>>>      
>>>
>>>>>~Lacey~
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>I would assume it's like all the other commands which require
>>>>Enter....which happens when you hit Enter on each line of the batch
>>>>        
>>>>
>file.
>  
>
>>>>Terry
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>----- Original Message -----
>>>>>From: DavisUnit <davist@xxxxxxxxxxx>
>>>>>Date: Wednesday, August 20, 2003 2:31 pm
>>>>>Subject: -=PCTechTalk=- Re: How to write batch file
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>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

Other related posts: