Jump to content

gvim6.3 for windows unattended


TMaYaD
 Share

Recommended Posts

This might be pretty trivial but I'm posting this for those who doesn't have a clue about what to do.

This is how I created an unattended install when the NSIS failed to silent install.(It throws up the prompt if I want to install?yes|no)

I downloaded vim63rt.zip and gvim63.zip(or you can get vim63ole.zip if you prefer to) from Vim downloads.

then I extracted them to my testgrounds(G:, The drive I use 4 experimenting).

Now download and place the attached uninstaller and place it in (testgrounds)\vim\vim63 folder. this created a folder structure like follows

(testgrounds)
 |
  -Vim
     |
      -vim63
         |
          -install.exe
          -uninstall-gui.exe
          -(Other files)

Then I created a file [vinst.cmd] in 'Vim' directory

@echo off
cd vim63
echo. | install.exe -create-batfiles gvim evim gview gvimdiff -create-vimrc -install-popup -install-openwith -add-start-menu -create-directories vim -register-OLE
cd ..

echo colorscheme evening>>_vimrc

del vinst.cmd

notice the echo colorscheme evening>>_vimrc line, this is to customise the vim. To add more settings, add more lines similar to it. see the vim manual on _vimrc file and replace the colorscheme evening part with anything you want.

now select the contents of the vim directory, i.e, vim63 folder and vinst.cmd file (not the vim directory) and rar them(get winrar from www.rarlab.com).

now click on the sfx button and then 'Advanced SFX options'.

Enter "Vim" as path to extract and select "create in program files" radio button.

enter vinst.cmd in "Run after extraction" text box.

Then go to Modes (third) tab nad select Hide all for silent mode and overwrite all files for overwrite mode.

click ok and again ok.

you will get an exe file in the same directory as your rar file. Double click it to silent install or copy it to

$OEM$\$1\Install\VIM

and add the following to your RunOnceEx.cmd

REG ADD %KEY%\020 /VE /D "gVIM 6.3" /f
REG ADD %KEY%\020 /V 1 /D "%systemdrive%\install\VIM\vim.exe" /f

see aarons Unattended guide for more details on later method.

uninstall_gui.exe

Link to comment
Share on other sites


For everybody else wondering, it's a text editor.

What do you mean by that?

Some day i will try to install gvim with the NSIS. If the NSIS script gets to my hands i will make unattended gvim install possible.

Link to comment
Share on other sites

artbio: Hi, Right now I'm on linux. I'll check out later today about the uninstall entries and let you know about them.

crahak and rest, gVIM is more than a simple text editor and the only competent I've seen so far is xEmacs. You have to use them to feel 'em, there is no other way. (I'm an ordant fan amn't I?)

Link to comment
Share on other sites

artbio: Hi, Right now I'm on linux. I'll check out later today about the uninstall entries and let you know about them.

crahak and rest, gVIM is more than a simple text editor and the only competent I've seen so far is xEmacs. You have to use them to feel 'em, there is no other way. (I'm an ordant fan amn't I?)

I love Gvim too!

Well, we could mail the author. Maybe he would want to help us, by changing the NSIS script, making unattended possible!

Link to comment
Share on other sites

Finally i was able to create an AutoIt v3 Script for Gvim 6.3!

It installs GVim 6.3 full installation.

Download AutoIt version 3 at this link:

http://www.autoitscript.com/autoit3/downloads.php

Downolad the file attached to this post and place it at the same directory as gvim install file.

Install AutoIt from the above link.

Compile the script.

Here is the code:

:
; AutoIt Version: 3.0
; Language:       English
; Platform:       WinXP
; Author:         engine
;
; Script Function:
;   Install gVim 6.3
;

$g_szVersion = "gVim AutoIt v3 Script 1.0"
If WinExists($g_szVersion) Then Exit; It's already running
AutoItWinSetTitle($g_szVersion)

; Run the installer
Run("gvim63.exe")

; Options
AutoItSetOption("TrayIconHide", 1)
AutoItSetOption("WinTitleMatchMode", 3)

WinWaitActive("Vim 6.3 Setup")
Send("{ENTER}")

WinWaitActive("Vim 6.3 Setup: License Agreement")
Send("{ENTER}")

WinWaitActive("Vim 6.3 Setup: Installation Options")
Send("{DOWN 2}" & "{TAB 3}" & "{ENTER}")

WinWaitActive("Vim 6.3 Setup: Installation Folder")
Send("{ENTER}")

WinSetState("Vim 6.3 Setup: Installing", "", @SW_HIDE)

ProcessWait("install.exe")
Sleep(500)
Send("{ENTER}")

WinWaitActive("Vim 6.3 Setup: Completed")
Send("{ENTER}")

WinWaitActive("Vim 6.3 Setup")
Send("{RIGHT}" & "{ENTER}")

; Finished!

As you can see, the install file must be named gvim63.exe.

Hope this can help!

gvim.au3

Link to comment
Share on other sites

Updated script.

Now, as silent as i could get it!

If anyone knows a way of make it completely silent, let me know please.

Thanks!

;
; AutoIt Version: 3.0
; Language:       English
; Platform:       WinXP
; Author:         engine
;
; Script Function:
;   Install gVim 6.3
;

$g_szVersion = "gVim AutoIt v3 Script 2.0"
If WinExists($g_szVersion) Then Exit; It's already running
AutoItWinSetTitle($g_szVersion)

; Run the installer
Run("gvim63.exe")

; Options
AutoItSetOption("TrayIconHide", 1)
AutoItSetOption("WinTitleMatchMode", 3)
AutoItSetOption("WinWaitDelay", 100)

WinWait("Vim 6.3 Setup")
WinSetState("Vim 6.3 Setup", "", @SW_HIDE)
ControlClick("Vim 6.3 Setup", "", "Button1")

WinWait("Vim 6.3 Setup: License Agreement")
WinSetState("Vim 6.3 Setup: License Agreement", "", @SW_HIDE)
ControlClick("Vim 6.3 Setup: License Agreement", "", "Button2")

WinWait("Vim 6.3 Setup: Installation Options")
WinSetState("Vim 6.3 Setup: Installation Options", "", @SW_MINIMIZE)
ControlCommand( "Vim 6.3 Setup: Installation Options", "", "ComboBox1", "SelectString", "Full")
WinWait("Vim 6.3 Setup: Installation Options", "Full")
WinSetState("Vim 6.3 Setup: Installation Options", "Full", @SW_HIDE)
ControlClick("Vim 6.3 Setup: Installation Options", "", "Button2")

WinWait("Vim 6.3 Setup: Installation Folder")
WinSetState("Vim 6.3 Setup: Installation Folder", "", @SW_HIDE)
ControlClick("Vim 6.3 Setup: Installation Folder", "", "Button2")

WinSetState("Vim 6.3 Setup: Installing", "", @SW_HIDE)

ProcessWait("install.exe")
While ProcessExists("install.exe")
Sleep(50)
Send("{ENTER}")
WEnd

ProcessClose("install.exe")

WinWait("Vim 6.3 Setup: Completed")
WinSetState("Vim 6.3 Setup: Completed", "", @SW_HIDE)
ControlClick("Vim 6.3 Setup: Completed", "", "Button2")

WinWait("Vim 6.3 Setup")
WinSetState("Vim 6.3 Setup", "", @SW_HIDE)
ControlClick("Vim 6.3 Setup", "", "Button2")

Exit

If anyone wonders, engine is a login i use in most online forums.

By the way, how can i change my login name in this forum from artbio to engine?

gvim.au3

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