Jump to content

Autoit3 portable on U3 USB Key


 Share

Recommended Posts

Thanks Danny,

But what i want is to install Autoit on an usb key and what you preconize is only the possibility to launch scite since an usb key.

That link looks lik eit shows how to run an autoit script using Scite, all on a USB drive. If that is not what you want what do you mean by installing AutoIt on a USB drive? Do you want to be able to double click an au3 file on the usb drive and run it even though AutoIt is not installed on the PC?

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

That link looks lik eit shows how to run an autoit script using Scite, all on a USB drive. If that is not what you want what do you mean by installing AutoIt on a USB drive? Do you want to be able to double click an au3 file on the usb drive and run it even though AutoIt is not installed on the PC?

It's exactly what i want to do I want to install Autoit on an USB Drive and clicking on an au3 file even if atoit3 is not installed
Link to comment
Share on other sites

I cannot find the link, but the script below was made by Jos. Keep in mind you need administrator right for this script to work.
 

#Region Compiler directives section
;** This is a list of compiler directives used by CompileAU3.exe.
;** comment the lines you don't need or else it will override the default settings
#Compiler_Prompt=n                              ;y=show compile menu
;** AUT2EXE setting
;** Target program Resource info
#Compiler_Res_Comment=Run Autoit/SciTE from JumpDrive
#Compiler_Res_Description=Run Autoit/SciTE from JumpDrive
#Compiler_Res_Fileversion=1.0.1                  ;File Version
; free form resource fields ... max 15
#Compiler_Res_Field=Created by|Jos van der Zande  ;Free format fieldname|fieldvalue
#Compiler_Run_AU3Check=y                        ;Run au3check before compilation
#EndRegion
;
;
AutoItSetOption("RunErrorsFatal", 0)
AutoItSetOption("OnExitFunc", "Exitfunction")
;
TrayTip("JumpKey", "Updating AutoIt3 Registry settings...", 5)
Sleep(1000)
;
StartFunction()
;
TrayTip("JumpKey", "Updating the SciTE settings....", 5)
FileChangeDir(@ScriptDir & "\SciTE\defs\")
;use this line to run Updatedefs silent and tell SciTE to use the last Production tables
RunWait(@ScriptDir & "\SciTE\defs\UpdateDefs.exe prod /s", @ScriptDir, @SW_HIDE)
;use this line to run Updatedefs silent and tell SciTE to use the last Beta tables'
;RunWait(@ScriptDir & "\SciTE\defs\UpdateDefs.exe unst /s", @ScriptDir, @SW_HIDE)
FileChangeDir(@ScriptDir)
;
TrayTip("JumpKey", "Autoit3 and SciTE are ready for use.", 5)
While FileExists(@ScriptFullPath)
    Sleep(10)
WEnd
;
;
;
Func StartFunction()
; save current registry settings and update to MEMKey Path
    $key = "HKLM\Software\Autoit v3\AutoIt"
    $word = "InstallDir"
    $Value = @ScriptDir
    Update_Registry($key, $word, $Value)
    $key = "HKCR\AutoIt3Script\DefaultIcon"
    $word = ""
    $Value = @ScriptDir & '\Icons\filetype1.ico'
    Update_Registry($key, $word, $Value)
    $key = "HKCR\AutoIt3Script\Shell"
    $word = ""
    $Value = "Edit"
    Update_Registry($key, $word, $Value)
    $key = "HKCR\AutoIt3Script\Shell\Run"
    $word = ""
    $Value = "Run Script"
    Update_Registry($key, $word, $Value)
    $key = "HKCR\AutoIt3Script\Shell\Run\Command"
    $word = ""
    $Value = '"' & @ScriptDir & '\AutoIt3.exe "%1" %*"'
    Update_Registry($key, $word, $Value)
    $key = "HKCR\AutoIt3Script\Shell\Open"
    $word = ""
    $Value = "Open"
    Update_Registry($key, $word, $Value)
    $key = "HKCR\AutoIt3Script\Shell\Open"
    $word = ""
    $Value = "Open"
    Update_Registry($key, $word, $Value)
    $key = "HKCR\AutoIt3Script\Shell\Open\Command"
    $word = ""
    $Value = '"' & @ScriptDir & '\SciTe\SciTE.exe" "%1""'
    Update_Registry($key, $word, $Value)
    $key = "HKCR\AutoIt3Script\Shell\Compile"
    $word = ""
    $Value = "Compile Script"
    Update_Registry($key, $word, $Value)
    $key = "HKCR\AutoIt3Script\Shell\Compile\Command"
    $word = ""
    $Value = '"' & @ScriptDir & '\Aut2Exe\Au32Exe.exe "%l""'
    Update_Registry($key, $word, $Value)
    $key = "HKCR\AutoIt3Script\Shell\Edit"
    $word = ""
    $Value = "Edit"
    Update_Registry($key, $word, $Value)
    $key = "HKCR\AutoIt3Script\Shell\Edit\Command"
    $word = ""
    $Value = '"' & @ScriptDir & '\SciTe\SciTE.exe" "%1""'
    Update_Registry($key, $word, $Value)
    $key = "HKCR\AutoIt3Script\Shell\Tidy"
    $word = ""
    $Value = "Tidy"
    Update_Registry($key, $word, $Value)
    $key = "HKCR\AutoIt3Script\Shell\Tidy\Command"
    $word = ""
    $Value = '"' & @ScriptDir & '\SciTe\Tidy\tidy.exe" "%1""'
    Update_Registry($key, $word, $Value)
    $key = "HKCR\AutoIt3Script\Shell\Compile with Options"
    $word = ""
    $Value = "Compile with Options"
    Update_Registry($key, $word, $Value)
    $key = "HKCR\AutoIt3Script\Shell\Compile with Options\Command"
    $word = ""
    $Value = '"' & @ScriptDir & '\SciTe\CompileAU3\CompileAu3.exe" /in "%l""'
    Update_Registry($key, $word, $Value)
EndFunc  ;==>StartFunction
;
;
;
Func ExitFunction()
    TrayTip("JumpKey", "Restoring AutoIt3 Registry settings....", 5)
  ; Restore to saved registry settings
    $key = "HKLM\Software\Autoit v3\AutoIt"
    $word = "InstallDir"
    Restore_Registry($key, $word)
    $key = "HKCR\AutoIt3Script\DefaultIcon"
    $word = ""
    Restore_Registry($key, $word)
    $key = "HKCR\AutoIt3Script\Shell"
    $word = ""
    Restore_Registry($key, $word)
    $key = "HKCR\AutoIt3Script\Shell\Run"
    $word = ""
    Restore_Registry($key, $word)
    $key = "HKCR\AutoIt3Script\Shell\Run\Command"
    $word = ""
    Restore_Registry($key, $word)
    $key = "HKCR\AutoIt3Script\Shell\Open"
    $word = ""
    Restore_Registry($key, $word)
    $key = "HKCR\AutoIt3Script\Shell\Open"
    $word = ""
    Restore_Registry($key, $word)
    $key = "HKCR\AutoIt3Script\Shell\Open\Command"
    $word = ""
    Restore_Registry($key, $word)
    $key = "HKCR\AutoIt3Script\Shell\Compile"
    $word = ""
    Restore_Registry($key, $word)
    $key = "HKCR\AutoIt3Script\Shell\Compile\Command"
    $word = ""
    Restore_Registry($key, $word)
    $key = "HKCR\AutoIt3Script\Shell\Edit"
    $word = ""
    Restore_Registry($key, $word)
    $key = "HKCR\AutoIt3Script\Shell\Edit\Command"
    $word = ""
    Restore_Registry($key, $word)
    $key = "HKCR\AutoIt3Script\Shell\Tidy"
    $word = ""
    Restore_Registry($key, $word)
    $key = "HKCR\AutoIt3Script\Shell\Tidy\Command"
    $word = ""
    Restore_Registry($key, $word)
    $key = "HKCR\AutoIt3Script\Shell\Compile with Options"
    $word = ""
    Restore_Registry($key, $word)
    $key = "HKCR\AutoIt3Script\Shell\Compile with Options\Command"
    $word = ""
    Restore_Registry($key, $word)
    FileDelete(@TempDir & "\curconfig.ini")
   Sleep(3000)
EndFunc  ;==>ExitFunction
;
;Save Current Registry settings in an INI and update the Registry
Func Update_Registry($key, $word, $Value)
    $oldVal = RegRead($key, $word)
    $sword = $word
    If $word = "" Then $sword = "Default"
    $skey = StringReplace($key, '\', '_')
    IniWrite(@TempDir & "\curconfig.ini", $skey, $sword, $oldVal)
    RegWrite($key, $word, "REG_SZ", $Value)
EndFunc  ;==>Update_Registry
;
;Restore the saved Registry settings from the INI file.
Func Restore_Registry($key, $word)
    $sword = $word
    If $word = "" Then $sword = "Default"
    $skey = StringReplace($key, '\', '_')
    $Value = IniRead(@TempDir & "\curconfig.ini", $skey, $sword, "")
    If $Value = "" Then
        RegDelete($key, $word)
    Else
        If StringInStr($Value, '"') Then $Value = '"' & $Value & '"'
        RegWrite($key, $word, "REG_SZ", $Value)
    EndIf
    $Value = IniDelete(@TempDir & "\curconfig.ini", $skey, $sword)
EndFunc  ;==>Restore_Registry

Note:
The script is a few years old you may have to change some of the function to make it AutoIt v3.3.0.0 compatible.

Edited by Jos
AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Link to comment
Share on other sites

That link looks lik eit shows how to run an autoit script using Scite, all on a USB drive. If that is not what you want what do you mean by installing AutoIt on a USB drive? Do you want to be able to double click an au3 file on the usb drive and run it even though AutoIt is not installed on the PC?

Do you want to be able to double click an au3 file on the usb drive and run it even though AutoIt is not installed on the PC?

Yes i's exactly what i want to do

Link to comment
Share on other sites

  • Developers

I cannot find the link, but the script below was made by Jos. Keep in mind you need administrator right for this script to work.

The script is a few years old you may have to change some of the function to make it AutoIt v3.3.0.0 compatible.

This one : #64536 ? >_<

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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