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

  • From: DavisUnit <davist@xxxxxxxxxxx>
  • To: pctechtalk@xxxxxxxxxxxxx
  • Date: Thu, 21 Aug 2003 18:22:36 -0300

stormy1@xxxxxxx wrote:

>Terry,
>
>Thank you so much for your help on this!
>I have one more little request -- this isn't necessary but could I also put in 
>an echo at the beginning saying "please make sure you have the CD in drive D:" 
>and have some way of pausing to allow them to do that if they haven't already? 
>(And yes, the d:\DIR?? is a constant on all machines since the files have to 
>be re-copied off the original program CD in order to solve the problem).
>
>Thanks again for your help!
>~Lacey~
>
Yes Lacey, you can put an echo in anywhere you'd like, saying anything 
you want.
I actually should've put a pause command at the end, so they actually 
see that, otherwise, the screen may just close at the end of commands 
without them seeing it.  So, hopefully this is what you need:
--------------------------
@echo off
cls
echo.
echo Please make sure you have the CD in drive D"
echo.
pause
c:
cd\windows\system
del comctl32.ocx
del comdlg32.ocx
copy d:\DIR???\comctl32.ocx
copy d:\DIR???\comdlg32.ocx
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.
echo.
pause

--------------------------
Terry
p.s. I would suggest you experiment to confirm all is well.

>
>----- Original Message -----
>From: DavisUnit <davist@xxxxxxxxxxx>
>Date: Thursday, August 21, 2003 7:04 am
>Subject: -=PCTechTalk=- Re: How to write batch file
>
>  
>
>>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
>>
>>    
>>


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: