Something about

  • Run Registry DLL into System32

  • ///////////////////////////////////////////////////////////////////////////////
    //
    // Function: RunRegistryDLL
    //
    //  Purpose: This function handles the standard welcome dialog.
    //
    //
    ///////////////////////////////////////////////////////////////////////////////
      
    
    function RunRegistryDLL()
          STRING file ,dll;
    begin
        	   
    		file = WINSYSDIR  +  "\\regsvr32.exe" ;  
    		dll =  "/s msxml4.dll";
    		LaunchAppAndWait(file, dll, LAAW_OPTION_WAIT | LAAW_OPTION_HIDDEN); 
    		//
    		dll =  "/s IGTabs40.ocx";
    		LaunchAppAndWait(file, dll, LAAW_OPTION_WAIT | LAAW_OPTION_HIDDEN);
    		//
    		dll =  "/s IGThreed40.ocx";
    		LaunchAppAndWait(file, dll, LAAW_OPTION_WAIT | LAAW_OPTION_HIDDEN); 
    		//
    		dll =  "/s MSCOMCTL.OCX";
    		LaunchAppAndWait(file, dll, LAAW_OPTION_WAIT | LAAW_OPTION_HIDDEN);
    		//
    		dll =  "/s RICHTX32.OCX";
    		LaunchAppAndWait(file, dll, LAAW_OPTION_WAIT | LAAW_OPTION_HIDDEN);
    		
    end; 
    
  • Create a File Bat

  • function CreateFileBat(INSTANCE_NAME,szFileNameBat,szParaPathWriteLine,szParaArgument) 
        STRING  szTitle, szMsg; 
        NUMBER  nvFileHandle;
        STRING szPathDir; 
        STRING para;
    begin 
         szPathDir=WINDISK^"\\"; 
         OpenFileMode (FILE_MODE_APPEND); 
         if (CreateFile (nvFileHandle, szPathDir, szFileNameBat) < 0) then 
            MessageBox ("CreateFile failed.", SEVERE); 
            abort; 
         else 
        	para="\"" + szParaPathWriteLine +"\"";
            szParaArgument=szParaArgument+" "+ para;
            if (WriteLine(nvFileHandle, szParaArgument) < 0) then 
                MessageBox ("WriteLine failed.", SEVERE); 
            else 
            endif; 
         endif; 
         CloseFile (nvFileHandle);
         if LaunchAppAndWait (WINDISK^"\\"+szFileNameBat,"", WAIT)<0 then
    		//MessageBox("StartService khong thanh cong" + szMsg,WARNING);
    	 else                              
    		//MessageBox("StartService thanh cong"+ szMsg,WARNING); 
    	 endif;
    	 //DeleteFile(WINDISK^"\\"+szFileNameBat);
    	 
    end;
    //Using..................
    CreateFileBat(INSTANCE_NAME,"RunMastaseIIS.bat","iusr_"+GetServerName(),
    WINDISK^"\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\aspnet_regiis.exe -ga");
    

    Leave a Reply

    Please log in using one of these methods to post your comment:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s

    %d bloggers like this: