Archive: ZipDLL & autostart


AutoPlay and Unzip plugin Question
hello,

1.)does anyone know how to add in the unzip as a plugin into NSIS?

for example i would like to place PHP.zip into a folder in d:\php\php.zip, i need NSIS to access that zip file, unzip it in c:\temp or wherever.

is it possible to give me the specific Instructions in my codes and how to put it into the plugin folder in NSIS, And what else is there to change.
i think you have to add that *.dll as a module or macro. ?????

2.) Is there a autostart or autorun funciton in NSIS so that once i compile the EXE and place it on to the Cd, Once i put in the CD with that EXE file, i need it to autorun or autoinstall without human intervention.

Is it possible? If so HOW, Show ME.

Asch


The ZipDLL plugin DLL file should be placed either in the nsis\plugins directory or a directory of your choice. If you use the latter approach you will need to use the PluginDir command to tell NSIS where to find the DLL file. For example if you place the zipdll plugin dll file in C:\myplugins you would do :-

PluginDir c:\myplugins
Make sure you use that command outside any sections or functions.

You can check to see if NSIS has found the plugin by opening examples\example1.nsi with the makensisw program. When it compiles the script at the top you should see something like :-
Processing plugin dlls: "C:\src\cvs_nsis\NSIS\plugins\*.dll"
- advsplash::show
- Banner::destroy
- Banner::show
...
- UserInfo::GetAccountType
- UserInfo::GetName
- ZipDLL::extractall
- ZipDLL::extractfile


At the bottom you can see that it detected the ZipDLL plugin okay.

Then in your script you can (as the ZipDLL documentation suggests) run the extractall or extractfile plugin commands :-
ZipDLL::extractall "c:\test.zip" "c:\output"


ZipDLL also has support for the Modern UI, read the readme.txt file distributed with ZipDLL v1.2 for more information.

Autorun is a feature controlled by a file on the CD called autorun.inf, it's nothing to do with NSIS. Microsoft documentation on this feature of Windows can be found here.

ZIP.dll and Autoplay
Hello,

Thank you, It wasn't there earlier but after i placed the dll file to plugin folder in nsis, It now works.

Also thank you for the autoplay info, i guess i will need to build an *.inf file in that d: drive and hopefully the cd drive read will the file first and then execute my EXE file automatically.

Asch


Be careful, the d: drive won't be the cd drive on all systems. This post might help you.


Autoplay and dll and Finding cd rom drives
hello,

thanks for the link, here is the code.

OutFile "blah.exe"

!include "${NSISDIR}\Contrib\System\System.nsh"

Section -
StrCpy $1 "c:\"
System::Call '${sysGetDriveType}(r1) .r0'
DetailPrint "Boo: $1 $0"
IntCmp $0 5 0 notcddrive
MessageBox MB_OK "Drive $1 is a cd drive"
notcddrive:
SectionEnd

Solved CD Auto PLay
Code:

; save this part as autorun.inf
; this is it to autorun EXE files
[autorun]
; the executable must be in root Cd drive
open=install.exe
icon=whatever_icon_you_want.ico

As far as the zipdll file, i think you can download in one of these forum, earlier ones. Aall you need is that dll file and put it in the Plugins folder under NSIS. Everythiing will work.

More codes to come for my script for apache, mysql, others.

Testing Messagebox, ExecWait, copyfiles!

asch


The ZIPDll is available in the archive:
http://nsis.sourceforge.net/archive/....php?pageid=56