Jump to content

For %11 Comand


Venom4444
 Share

Recommended Posts

Start with the help file. Try out the basic tutorials there. You might also be interested in the AutoIt 1-2-3 full tutorial linked below in my sig.

Get familiar with FileCopy(), RunWait(), FileFindFirstFile() and FileFindNextFile().

By the time you do that, this will be a very easy script for you.

;)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Either pure AutoIT

#Include <File.au3>
Local $Destination = @WindowsDir & '\System32'

$OCXes = _FileListToArray(@ScriptDir, '*.ocx', 1)
$DLLs = _FileListToArray(@ScriptDir, '*.dll', 1)

If IsArray($OCXes) Then
    For $i = 1 to $OCXes[0]
        FileCopy(@ScriptDir & '\' & $OCXes[$i], $Destination & '\', 1)
        RunWait('regsvr32 /s "' & $Destination & '\' & $OCXes[$i] & '"')
    Next
EndIf
If IsArray($DLLs) Then
    For $i = 1 to $DLLs[0]
        FileCopy(@ScriptDir & '\' & $DLLs[$i], $Destination & '\', 1)
        RunWait('regsvr32 /s "' & $Destination & '\' & $DLLs[$i] & '"')
    Next
EndIf
RunWait('regedit /s NetTools5.0.reg')
or run the commands within AutoIT
Opt('ExpandEnvStrings', 1)
RunWait(@ComSpec & ' /c copy *.ocx %windir%\system32 /y', @ScriptDir)
RunWait(@ComSpec & " /c for /F %s in ('dir /b *.*') do regsvr32 /s %s")
RunWait(@ComSpec & " /c for /f %s in ('dir /b *.ocx') do regsvr32 /s %s")
RunWait('regedit /s NetTools5.0.reg')
but the latter way registers the DLLs and OCXes from the current directory, not from the %WINDIR%\System32

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...