Archive: Showing video just after pressing install ?


Showing video just after pressing install ?
Hi again,

Im wondering if its possible to show the video i created, and extracted before all else faster when pressing install ?

this is what i did to make it show it after i press install, but on slow systems, the video would be almost 30 sec to start, and installation is half done hehe, though video is 9 Mb only ?

Function .onInit
CreateDirectory "c:\vidtmp8\"
file "/oname=c:\vidtmp8\vidtmp8.exe" "G:\Projector.exe"
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\GhostRecon.exe" "path"
StrCmp $R0 "" NotPresent Present
notpresent:
MessageBox MB_OK "Welcome To BoB Map Pack installer, browse to your ghostrecon installation folder to install this mod."
StrCpy $INSTDIR "$programfiles\Red Storm Entertainment\Ghost Recon\"
goto done
present:
strcpy $instdir $R0
done:
FunctionEnd

Function .onVerifyInstDir
IfFileExists $INSTDIR\ghostrecon.exe PathGood
Abort
PathGood:
FunctionEnd

Section "MainSection" SEC01
Exec "c:\vidtmp8\vidtmp8.exe"
SetOutPath "$INSTDIR\Mods\Bobs Mappack 1_3"
SetOverwrite on
File /r "G:\Ghost Recon\mods\Bobs Mappack 1_3\*.*"
sectionend

Function .onInstSuccess
Delete "c:\vidtmp8\vidtmp8.exe"
RMDIR "c:\vidtmp8\"
functionend

I know execwait will probably do the trix, but i also want the installer to install files in the background.

I guess there is an command to look for running processes, and continue if vidtmp8.exe is running ?


you can put your Exec "c:\vidtmp8\vidtmp8.exe" in the onint function


Yea i could, but then when video finish(fullscreen), you still have to press install, and wait some more, its not what i wanted, i wanted to show the video while installing, so to not use more time than possible :-)


I added an exampel of my problem, it only install some files where you want, no registry edit but the uninstall section, so plz try this and see my problem for your self ( files installed is for an mod to the game ghost recon), no exe files, just the projector file, that will be deleted at the end of installation.

Path to source nsis script : http://www.mediafire.com/file/nxtoz10mjoi/VideoTest.nsi

Path to video installer test : http://www.mediafire.com/?mmjy4ldznjv Its about 47.66 MB compressed and 147.7 MB installed


if they dont have to select a directory then why dont you just go strait to the install section with out them pressing install that way they dont have to press anything then after the videos done it will be done you can either close the installer or leave a page saying blah blahs been installed that they will see when the video closes

edit
how come your not showing your page with the links at the end


Well its not sure the installation path can be found in reg, so ppl may need to locate the right folder.

And above video test, i made it so it only shows the important test.


Well i found a plugin to look for processes, but something must be wrong in my code ? , since installer will wait until video is finish before installing the files.

Section "MainSection" SEC01
Exec "z:\video.exe"
videowait:
Processes::FindProcess "video"
Pop $R0
StrCmp $R0 "1" wait nowait
wait:
goto videowait
nowait:
SetOutPath "$INSTDIR\Mods\BB_AIO_180"
SetOverwrite on
File /r "G:\Ghost Recon\mods\BB_AIO_180\*.*"
sectionend

also tried StrCmp $R0 "0" wait nowait
that would just be like before, where installation started installing, and then video shows some sec after.

is there any pause command you could add ? for like 5 sec
or another plugin i should try?