ÿþO p t i o n   E x p l i c i t  
  
 C o n s t   m s i O p e n D a t a b a s e M o d e R e a d O n l y   =   0  
 C o n s t   m s i O p e n D a t a b a s e M o d e T r a n s a c t   =   1  
  
 D i m   a r g N u m ,   a r g C o u n t : a r g C o u n t   =   W s c r i p t . A r g u m e n t s . C o u n t  
 I f   ( a r g C o u n t   <   1 )   T h e n  
 W s c r i p t . E c h o    P l e a s e   s u p p l y   t h e   n a m e   o f   t h e   m s i   f i l e   t o   b e   m o d i f i e d .   
 W s c r i p t . Q u i t   1  
 E n d   I f  
  
    S c a n   a r g u m e n t s   f o r   v a l i d   S Q L   k e y w o r d   a n d   t o   d e t e r m i n e   i f   a n y   u p d a t e   o p e r a t i o n s  
 D i m   o p e n M o d e   :   o p e n M o d e   =   m s i O p e n D a t a b a s e M o d e R e a d O n l y  
 o p e n M o d e   =   m s i O p e n D a t a b a s e M o d e T r a n s a c t  
  
    C o n n e c t   t o   W i n d o w s   i n s t a l l e r   o b j e c t  
 D i m   i n s t a l l e r   :   S e t   i n s t a l l e r   =   N o t h i n g  
 S e t   i n s t a l l e r   =   W s c r i p t . C r e a t e O b j e c t (  W i n d o w s I n s t a l l e r . I n s t a l l e r  )   :   C h e c k E r r o r  
  
    O p e n   d a t a b a s e  
 D i m   d a t a b a s e P a t h : d a t a b a s e P a t h   =   W s c r i p t . A r g u m e n t s ( 0 )  
 D i m   d a t a b a s e   :   S e t   d a t a b a s e   =   i n s t a l l e r . O p e n D a t a b a s e ( d a t a b a s e P a t h ,   o p e n M o d e )   :   C h e c k E r r o r  
  
    P r o c e s s   S Q L   s t a t e m e n t s   a n d   d e l e t e   t h e   c r a p   o u t   o f   t h i s   i n s t a l l e r !  
 D i m   q u e r y ,   v i e w ,   r e c o r d ,   m e s s a g e ,   r o w D a t a ,   c o l u m n C o u n t ,   d e l i m ,   c o l u m n  
 S e t   v i e w   =   d a t a b a s e . O p e n V i e w (  D e l e t e   f r o m   L a u n c h C o n d i t i o n  )   :   C h e c k E r r o r  
 v i e w . E x e c u t e  
 w s c r i p t . e c h o    L a u n c h   C o n d i t i o n s   R e m o v e d   
 S e t   v i e w   =   d a t a b a s e . O p e n V i e w (  D e l e t e   f r o m   I n s t a l l E x e c u t e S e q u e n c e   w h e r e   A c t i o n =  O n C h e c k S i l e n t I n s t a l l   )  
 v i e w . E x e c u t e  
 w s c r i p t . e c h o    O n C h e c k S i l e n t I n s t a l l   s t e p   r e m o v e d   
 S e t   v i e w   =   d a t a b a s e . O p e n V i e w (  D e l e t e   f r o m   P r o p e r t y   w h e r e   P r o p e r t y   =    I S S E T U P D R I V E N   )  
 v i e w . E x e c u t e  
 w s c r i p t . e c h o    P r o p e r t y   I S S E T U P D R I V E N   r e m o v e d   
 S e t   v i e w   =   d a t a b a s e . O p e n V i e w (  I N S E R T   I N T O   P r o p e r t y   ( P r o p e r t y , V a l u e )   V A L U E S   (  I S S E T U P D R I V E N  , 1 )  )  
 v i e w . E x e c u t e  
 w s c r i p t . e c h o    P r o p e r t y   I S S E T U P D R I V E N   a d d e d   
 d a t a b a s e . C o m m i t  
 W s c r i p t . Q u i t   0  
  
 S u b   C h e c k E r r o r  
 D i m   m e s s a g e ,   e r r R e c  
 I f   E r r   =   0   T h e n   E x i t   S u b  
 m e s s a g e   =   E r r . S o u r c e   &         &   H e x ( E r r )   &    :      &   E r r . D e s c r i p t i o n  
 I f   N o t   i n s t a l l e r   I s   N o t h i n g   T h e n  
 S e t   e r r R e c   =   i n s t a l l e r . L a s t E r r o r R e c o r d  
 I f   N o t   e r r R e c   I s   N o t h i n g   T h e n   m e s s a g e   =   m e s s a g e   &   v b L f   &   e r r R e c . F o r m a t T e x t  
 E n d   I f  
 F a i l   m e s s a g e  
 E n d   S u b  
  
 S u b   F a i l ( m e s s a g e )  
 W s c r i p t . E c h o   m e s s a g e  
 W s c r i p t . Q u i t   2  
 E n d   S u b 
