Jump to content

TCM Launcer


Rex
 Share

Recommended Posts

Hmm just did a litle search in forum, and found that this has been made before, but... mine is a litle more advance.

And yes i know that, this script alsow can be used to not pay for the fine program that tcm is :D

Actely it has newer crosed my minde that, it could be used for that :D

I did made this script, so i could use my commander anyware - without woring to forget to delete my Wincmd.key (i did pay for tcm years ago :P) , with this script i can use a unregistrated ver. on any computer, direcly from a usb/cd or somthing else - and always use my own settings by adding this parM. to my Wincmd.ini file

[Configuration] 
UseIniInProgramDir=7

; Generated by NewScript 4.5
;----------------------------------------------------------------------------
; Created:        19-04-2006 20:58:28
; Author:          //>Rex<\\
; Mail:          RexPrivat AT Hotmail DOT Com
; Version:        3.1
; AutoitVer:        3.1.1.119
; AutoItForum:    
; Script Function:
; Simpel TCM auto Nag screen cliker
; At tcm start up, it auto cliks the Nag screen. --> But the "launche" needs to be in Tcm dir.
; Changelog:
; 22-04-2006
; Added Get From reg -->
;   --> Now the nagscreen clicker, reads install path (RegRead"HKEY_CURRENT_USER\Software\Ghisler\Total Commander", "InstallDir") 
;       from registry - if exist it launches Totalcmd.exe, this way the "Launcher" don't need to be in tcm dir.
; 23-04-2006
; Added FileOpenDialog -->
;   --> If no install path in registry, a FileOpenDialog is thrown at the user
;       Allows user to browse to the path of Totalcmd.exe, then we adds the path
;       to the registry ("HKEY_CURRENT_USER\Software\TCMLauncher", "InstallDir")
; 25-04-2006
; Added Check file exist -->
;   --> If a install path RegRead("HKEY_CURRENT_USER\Software\Ghisler\Total Commander", "InstallDir") is
;       found we do a checkup to be sure that the Totalcmd.exe exist, if not we throw the FileOpenDialog;-)
; 28-04-2006
; Added Cmdline del Reg -->
;   --> If launched with commandline "/delreg" then the launcher deletes it's own registry keys and exist.
; ----------------------------------------------------------------------------
#include <GUIConstants.au3>; Includes GUIConstants.au3 to script
; Opt's Start > --------------------------------------------------------------
 Opt("RunErrorsFatal", 0)      ;1=fatal, 0=silent set @error
; Opt("GUIOnEventMode", 0)     ;0=disabled, 1=OnEvent mode enabled
; Opt("GUICloseOnESC", 1)       ;1=ESC  closes, 0=ESC won't close
; Opt("TrayIconDebug", 0)       ;0=no info, 1=debug line info
 Opt("TrayMenuMode",1)        ;0=append, 1=no default menu, 2=no automatic check, 4=menuitemID  not return
; Opt("TrayOnEventMode",0)     ;0=disable, 1=enable
; Opt("TrayIconHide", 0)         ;0=show, 1=hide tray icon
; Opt("TrayAutoPause",1)         ;0=no pause, 1=Pause
; Opt's End > ----------------------------------------------------------------
; Script start
Global $TemPath

If $CmdLine[0] <> 0 Then
    If $CmdLine[1] = "/delreg" Then
        RegDelete("HKEY_CURRENT_USER\Software\TCMLauncher"); Deletes the registry of totalCmd launcher
        Exit
    EndIf
EndIf

TraySetToolTip("Total Comander Launcher and NAG screen Clicker"); Just to informe

;===> Get tcm install Path ! , normale C:\TotalCmd
;==> trying to get the install path from the Registry
$LauncherPath = RegRead("HKEY_CURRENT_USER\Software\TCMLauncher", "InstallDir"); Reads the registry to get install path;-)

If $LauncherPath = "" Then
    
    $Path = RegRead("HKEY_CURRENT_USER\Software\Ghisler\Total Commander", "InstallDir"); Checks registry for orginal install path
    
if $Path == "" Then
    
    _OpenFileDialog()
        
EndIf   
EndIf


If Not $LauncherPath = "" Then
    
    Run($LauncherPath)
    
ElseIf Not $Path = "" Then
    
    If FileExists($Path & "\Totalcmd.exe") Then; Do check if file exist :-}
    Run($Path & "\totalcmd.exe")
    _ClickNag()
    
ElseIf Not $TemPath = "" Then
    
    Run($TemPath)
    _ClickNag()
    
ElseIf FileExists(@ScriptDir & "\Totalcmd.exe") Then
    
    Run("Totalcmd.exe")
    _ClickNag()
    
Else
    _OpenFileDialog()
    Run($TemPath)
    _ClickNag()
    
EndIf
EndIf


Func _ClickNag()
If WinWaitActive("Total Commander", "Nag", 30) = 0 Then
    Exit
Else

$GetTxt = -1
While $GetTxt < 1
    
$GetTxt = ControlGetText("Total Commander", "Nag", "TPanel2")

Sleep(10)
WEnd
Dim $Buttons[3]
        $Buttons[0] = "TButton3"
        $Buttons[1] = "TButton2"
        $Buttons[2] = "TButton1"
ControlClick("Total Commander", "Nag", $Buttons[Number($GetTxt) - 1])
Exit
EndIf
EndFunc

Func _OpenFileDialog()

$TemPath = FileOpenDialog("Path to TotalCmd.exe", "", "(TOTALCMD.exe)",1+2, "TOTALCMD")
    RegWrite("HKEY_CURRENT_USER\Software\TCMLauncher", "InstallDir", "REG_SZ", $TemPath); Could be some other reg path, but hey...

EndFunc

Maby it useble for others ???

Link to comment
Share on other sites

why not just patch the nag with a debugger :P

Weel that would be just as fun (i don't know how to, and even if i did, i woulden. Cource in my eys it would be like stealing from Christian :DPosted Image

And by just "crack" the exe file i don't have to "play" with autoIT scripts :D

Link to comment
Share on other sites

  • 1 month later...

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...