Topic: .a3x file association  (Read 2397 times)

.a3x file association
« on: March 21, 2014, 02:55:49 PM »

fuwi

  • Code Baker
  • Chef
  • ***
  • Location: Switzerland
  • Date Registered: Nov 2012
  • Posts: 171
Hi Chris,

Is it possible to integrate in 2 - Shell & Config script also a AutoIt .a3x file association?
I think you know the benefit of this format.

AutoIt Help:
Scripts can be compile with .a3x extension. They should be run with AutoIt.exe filename.a3x.
The .a3x contains the script itself with all referred #include plus the FileInstall files.
This format allow to distribute smaller files as they don't include the AutoIt3.exe in each
compiled script. You still need to have it accessible on the target machine but just AutoIt3.exe.

This would be enough:
Code: [Select]
[a3xassociation]
Echo,"add A3X association..."
RegHiveLoad,Tmp_software,%RegSoftware%
RegWrite,HKLM,0x1,Tmp_software\Classes\.a3x,,a3xfile
RegWrite,HKLM,0x1,Tmp_software\Classes\a3xfile\DefaultIcon,,x:\Windows\system32\AU3381.exe
RegWrite,HKLM,0x1,Tmp_software\Classes\a3xfile\shell\open\command,,"x:\Windows\system32\AU3381.exe #$q%1#$q #$p*"
RegHiveUnLoad,Tmp_software

For example if i use the attached CheckdiskGui script in any PE, have to compile the CheckdiskGui.au3 to 64-bit for x64-builds (~770KB) and to 32-bit for x86-builds (~280KB).
Compiled as .a3x it is 12KB and it works unchanged in x64- and x86-builds.

* CheckDiskGUI.script (29.56 kB - downloaded 197 times.)

fuwi

btw: the latest AutoIt version is: v3.3.10.2 (-> AU33102.exe)
« Last Edit: March 21, 2014, 03:25:39 PM by fuwi »

Re: .a3x file association
« Reply #1 on: March 21, 2014, 04:07:18 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
btw: the latest AutoIt version is: v3.3.10.2 (-> AU33102.exe)
When there is a "must" situation, we would add to projects  :thumbsup:
 we avoid autoit version mismatches with au3 with this way,
  besides adding all au3 versions would increase size in time,
   hence we wait for the musth http://en.wikipedia.org/wiki/Musth  :lol:
===>

Re: .a3x file association
« Reply #2 on: March 21, 2014, 04:08:35 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
For the info
Gena\Adjunct\"AutoIt3 from Tools"
plugin have a3x lines, I believe plugin also compatible to SE

and for the info there is
Gena\Apps\HD Tasks\Diagnostic\"Check Disk GUI"


I like the idea,
besides instead of
Add_Shortcut,StartMenu,,,,,,hdd.ico

Something like
-->
Code: [Select]
[Variables]
%ProgramA3X%=ChkdskGui.a3x

[Process]
If,Not,ExistFile,%target_sys%\AU3381.exe,FileCopy,%Tools%\%SourceArch%\AU3381.exe,%target_sys%
//-
Add_Shortcut,StartMenu,,%SystemRoot%\AU3381.exe,%ProgramTitle%,#$q%PE_Programs%\%ProgramFolder%#$q,#$q%PE_Programs%\%ProgramFolder%\%ProgramA3X%#$q,%PE_Programs%\%ProgramFolder%\hdd.ico
would be a General, Standalone way without registry requirement  :wink:
 ps: one can prevent from double click a3x via registry  :wink:
   ps: I did not test shortcut, but I believe you get the idea  :great:

please update Gena\Apps\HD Tasks\Diagnostic\"Check Disk GUI" with a3x way + General approach (and add your name to Author=),
 I will follow your update  :great: :great:

:turtle:

Re: .a3x file association
« Reply #3 on: March 22, 2014, 12:38:47 AM »

ChrisR

  • XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
Is it possible to integrate in 2 - Shell & Config script also a AutoIt .a3x file association?

btw: the latest AutoIt version is: v3.3.10.2 (-> AU33102.exe)

That's OK, .a3x is now associated to AU3381.exe, AutoIt version v3.3.8.1
I also added AU33102 in Tools folder, replacing AU33100. It is copied to Target System32 when building.

:thumbsup:


 

Powered by EzPortal