Jump to content











Photo
* * - - - 1 votes

7z installer with silent install switch


  • Please log in to reply
7 replies to this topic

#1 bilou_gateux

bilou_gateux

    Frequent Member

  • Expert
  • 230 posts
  •  
    France

Posted 10 May 2007 - 07:40 PM

IMDisk looks very promising and i have a request for silent installation of the package during unattended OS deployment.

It's not a high priority request, just a wish for the near future.

modified version of the 7-zip SFX module for GNU 7-zip file archiver (http://www.7-zip.org/)

#2 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1366 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 10 May 2007 - 08:25 PM

IMDisk looks very promising and i have a request for silent installation of the package during unattended OS deployment.

It's not a high priority request, just a wish for the near future.

modified version of the 7-zip SFX module for GNU 7-zip file archiver (http://www.7-zip.org/)


Should be no problem. As I understand it I just have to use 7zSD.sfx from your archive instead when creating the install package exe and then it will be automatically possible to to specify imdiskinst -gm2 as command line for silent install. Am I right?

#3 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 10 May 2007 - 10:16 PM

Bilou

if you do remove the filecopy section from the inf you should be able to run the install from an unattended batch already.

I just played with manually installing it to bartpe and it works wonderful and will soon replace my regular ramdisk - (5.2 extended version)

Olof - many thanks for this :confused1:

#4 bilou_gateux

bilou_gateux

    Frequent Member

  • Expert
  • 230 posts
  •  
    France

Posted 11 May 2007 - 01:12 PM

Should be no problem. As I understand it I just have to use 7zSD.sfx from your archive instead when creating the install package exe and then it will be automatically possible to to specify imdiskinst -gm2 as command line for silent install. Am I right?


Yes, sample 7z configuration file i would like to have (keeping the current attended installation and adding unattended feature):

;!@Install@!UTF-8!
BeginPrompt="This will install the ImDisk Virtual Disk Driver with the imdisk.exe command line tool and a Control Panel applet. Continue?"
ExtractTitle="ImDisk Virtual Disk Driver"
RunProgram="install.cmd"
AutoInstall="install.cmd"
GUIMode="0"
;!@InstallEnd@!


This SFX can be used either for an interactive installation or for a totally silent installation with the corresponding switches.

If you run this SFX without switches, it will show you the "This will install the ImDisk Virtual Disk Driver with the imdisk.exe command line tool and a Control Panel applet. Continue?" dialog with Yes and No options. Clicking Yes extracts the SFX into the temp folder with the "ImDisk Virtual Disk Driver" title and the native extraction dialog. RunProgram command will run immediately after that, allowing user to control the s/w installation process. If you click Yes while holding down the [SHIFT] key (invokes an AutoInstall option), the RunProgram command will run with specified switches for the silent s/w installation.

If you run the same SFX with the -y -ai -gm2 switches, then "This will install the ImDisk Virtual Disk Driver with the imdisk.exe command line tool and a Control Panel applet. Continue?" dialog will be suppressed (native -y switch), AutoInstall option command will be invoked (-ai), and no extraction dialog will be shown (-gm2).

Either way the temp folder will be deleted after the installation.


The one i would like to use for Unattended install is imdiskinst.exe -y -ai -gm2

#5 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1366 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 11 May 2007 - 01:58 PM

If you run the same SFX with the -y -ai -gm2 switches, then "This will install the ImDisk Virtual Disk Driver with the imdisk.exe command line tool and a Control Panel applet. Continue?" dialog will be suppressed (native -y switch), AutoInstall option command will be invoked (-ai), and no extraction dialog will be shown (-gm2).

Either way the temp folder will be deleted after the installation.
The one i would like to use for Unattended install is imdiskinst.exe -y -ai -gm2


I didn't know about the -y switch to 7z sfx but I see now that it works. This means that it is possible to run imdiskinst.exe -y as it is right now to install ImDisk without user interaction. :confused1:

However I don't understand what you want here really, the extraction dialog is hardly even visible because the archive is very small. So the only things that are practically visible to users is a console window where install.cmd runs (that just launches rundll32.exe) and the copy file progress dialog from setupapi.dll. I don't think either of those can be hidden in any way. I think we have got to find another solution for the install process in that case, something like sanbarrow writes about here above. :confused1:

#6 bilou_gateux

bilou_gateux

    Frequent Member

  • Expert
  • 230 posts
  •  
    France

Posted 11 May 2007 - 02:17 PM

I didn't know about the -y switch to 7z sfx but I see now that it works. This means that it is possible to run imdiskinst.exe -y as it is right now to install ImDisk without user interaction. :confused1:

However I don't understand what you want here really, the extraction dialog is hardly even visible because the archive is very small. So the only things that are practically visible to users is a console window where install.cmd runs (that just launches rundll32.exe) and the copy file progress dialog from setupapi.dll. I don't think either of those can be hidden in any way. I think we have got to find another solution for the install process in that case, something like sanbarrow writes about here above. :confused1:


I haven't checked before the -y switch with your installer. It's enough for unattended install, although not fully hidden.

Don't bother to rebuild your installer now. I have built my own custom installer.

1. copy Oleg_Sch UPXed 7zS.sfx and config.txt to the imdiskinst build directory.
2. Pack up all the install files in a .7z (including hidcon.exe) using your favorite 7z archiver.
4. Drop the new .7z file on mk7zSsfx.bat. If the .7z, config.txt, and .sfx are in the same directory, the batch will automatically create the .exe with the same name as whatever you named your .7z.

hidcon.exe:wrappers
Tutorial to build a 7z installer.

config.txt
;!@Install@!UTF-8!

BeginPrompt="This will install the ImDisk Virtual Disk Driver with the imdisk.exe command line tool and a Control Panel applet. Continue?"

ExtractTitle="ImDisk Virtual Disk Driver"

RunProgram="hidcon.exe install.cmd"

AutoInstall="hidcon.exe install.cmd"

GUIMode="0"

;!@InstallEnd@!

build the package with this config.txt and using Oleg_Sch UPXed 7zS.sfx:
mk7zSsfx.bat ImDiskinst.7z

mk7zSsfx.bat
@copy /b "%~dp17zS.sfx" + "%~dp1config.txt" + %1 "%~dpn1.exe"

Now, i don't have console window where install.cmd runs. :confused1:

#7 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1366 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 11 May 2007 - 11:45 PM

I just wrote a small wrapper program that is now used to launch rundll32.exe instead of using a cmd file for that. This means that the console window is never displayed in the first place. I called this wrapper runwait.exe and it just launchs whatever it gets as parameter and waits for that to terminate. This replaces install.cmd so I have changed the RunProgram line in my 7zSDcfg.txt to launch runwait.exe rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 132 .\imdisk.inf instead of install.cmd.

So, there is no console window displayed now when the install package runs and for a completely unattended install it is possible to run imdiskinst.exe -y. :confused1:

#8 bilou_gateux

bilou_gateux

    Frequent Member

  • Expert
  • 230 posts
  •  
    France

Posted 12 May 2007 - 05:14 PM

:confused1:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users