Jump to content

Autoit SciTE silent install with "Default = Edit"


rudi
 Share

Recommended Posts

Hello,

very propably this has been asked before, well, I miss the thread(s) ...

Is there a command line switch to tell the SciTE setup EXE to install silently ("/S") *AND* to end up with "edit" (instead of "run") as system wide default action for *.au3 files?

 

:huh:

 

As it can be done with the config tool:

https://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/SciTEConfigb1.PNG

 

Regards, Rudi.

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Link to comment
Share on other sites

  • Developers

The installer doesn't  have any logic for the default action for "AU3" files as this is done by the AutoIt3 instller.
When you use a script to install SciTE you could the registry updates as done by SciTEConfig:

To set the default action to "Open" (Use SciTE.exe):

RegWrite('HKEY_CLASSES_ROOT\AutoIt3Script\Shell', '', 'REG_SZ', 'Open')
RegWrite('HKEY_CLASSES_ROOT\AutoIt3ScriptBeta\Shell', '', 'REG_SZ', 'Open')

Te Set the default to "Run" (Open with AutoIt3.exe) :

RegWrite('HKEY_CLASSES_ROOT\AutoIt3Script\Shell', '', 'REG_SZ', 'Run')
RegWrite('HKEY_CLASSES_ROOT\AutoIt3ScriptBeta\Shell', '', 'REG_SZ', 'Run')

Jos

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

Thanks Jos.

This requires registry actions after the install. Do you see any chance to "pass" a command line option like "/S" for silent to the installer package, so that it would be able by using just command line swiches for some future release?

 

Regards, Rudi.

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Link to comment
Share on other sites

  • Developers

Understood, as the installer would have to do that too. This is an NSIS installer so guess anything is possible when we want, but how are you performing this silent install?
Can't you simply add that registry change to that process which shells the SciTE installer?

Jos 

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

Hello Jos,

thanks for pointing out "NSIS".

Of course I can place the registry keys to the PC after the install is done, but with one command line would be a nice feature.

Q: ...  but how are you performing this silent install?

A: For a silent install I use the " /S" as a command line parameter. (An info from you, IIRC???)

 

 

I'll try to figure out, if this is a start to "transfer" the "request" to write the two registry keys to the NSIS installer:

 

http://nsis.sourceforge.net/Docs/Chapter4.html#registry

4.9.2.16 WriteRegStr

root_key subkey key_name value

Write a string to the registry. See WriteRegExpandStr for more details.

WriteRegStr HKLM "Software\My Company\My Software" "String Value" "dead beef"

Regards, Rudi.

Edited by rudi

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Link to comment
Share on other sites

  • Developers
1 hour ago, rudi said:

Q: ...  but how are you performing this silent install?

A: For a silent install I use the " /S" as a command line parameter. (An info from you, IIRC???)

This is a standard feature in NSIS (like most installer utilities: http://nsis.sourceforge.net/Docs/Chapter4.html#silent

When you are considering wrapping the installer with your one NSIS installer, it should be fairly easy to do so.
When you want, I can provide you a basic NSIS config source file to these 2 actions.
Just let me know and I'll have a look this evening.

Jos

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

  • Developers

Here you go...  Copy this source into a *.nsi file and store it in the same directory as the standard SciTE4AutoIt3 installer.
Compile this *.nsi file with NSIS and you should have an installer that runs silent and start the SciTE4AutoIt3 with /S  and then updates the registry to Edit.

Ask if anything is unclear. :)

Jos

; Script generated by the HM NIS Edit Script Wizard.
SetCompressor /SOLID lzma
; Script generated by the HM NIS Edit Script Wizard.
!define PRODUCT_NAME "SciTe4Autoit3 silent install wrapper"
!define PRODUCT_VERSION "1.0"
!define PRODUCT_PUBLISHER "Jos van der Zande"
!define PRODUCT_WEB_SITE "http://www.autoitscript.com/autoit3/scite"

; MUI 1.67 compatible ------
!include "MUI.nsh"

; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"

; Welcome page
!insertmacro MUI_PAGE_WELCOME
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!insertmacro MUI_PAGE_FINISH

; Language files
!insertmacro MUI_LANGUAGE "English"

; MUI end ------
SilentInstall silent
Section "MainSection" SEC01
  SetOverwrite on
  SetOutPath "$TEMP"
  File "SciTE4AutoIt3.exe"
  DetailPrint "*** Running installer  ***"
  ExecWait '"$TEMP\SciTE4AutoIt3.exe" /S'
  DetailPrint "*** set Edit as default for .au3  ***"
  WriteRegStr HKCR "AutoIt3Script\Shell\" "" "Edit"
  WriteRegStr HKCR "AutoIt3ScriptBeta\Shell\" "" "Edit"
  DetailPrint "*** Installer done  ***"
  sleep 2000
  delete "$TEMP\SciTE4AutoIt3.exe"
SectionEnd

Section -Post
SectionEnd

 

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

  • 2 weeks 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

×
×
  • Create New...