- NSIS Discussion
- Insalling .Net Framework in Silent mode
Archive: Insalling .Net Framework in Silent mode
watzr
23rd March 2010 18:04 UTC
Insalling .Net Framework in Silent mode
Hi,
I have written an installer which installs .Net Framework while installing other components if still it haven't been installed. I need to do it in Silent mode. so I have followed,
ExecWait '"$PATH\dotnetfx.exe /q:a /c:\install /l /q\"'.
Even though the installer shows that .Net framework setup is extracting, it doesn't really install .Net Framewrk. Can someone tell me why it's acting like this. When I install .Net Framework in the normal mode it asks to click next buttons, check license agreements, etc. But here in silent mode is there a way to provide hose parameters through the installer written by me?
Afrow UK
23rd March 2010 20:47 UTC
ExecWait `"$PATH\dotnetfx.exe" /q:a /c:\install /l /q`
You don't put quotes around the whole string, just the executable path.
Stu
hurlee
24th March 2010 07:10 UTC
Excuse me
Hi watzr
Im sorry to interrupt you. But im new to both .net and nsis. I have developed a vb.net application and wanted to use nsis it s installer.Can you show me how to do this using nsis?I have collected lots of info but i havent been able to do this myself.
My program prerequisets are :.net framework 3.5,Windows Installer 3.1 and Cards.dll
Thanks
ionut_y
24th March 2010 10:38 UTC
for windows installer 3.1 I use this :
ExecWait
'"WindowsInstaller.exe"/Q/O/Z'
For a small package of net framework 3.5 for 32 (31.43 MB) you can use this
http://www.mediafire.com/?y4yzdzjwvzz
ionut_y
24th March 2010 21:52 UTC
I forgot:the package from link above is silent by default
watzr
30th March 2010 09:06 UTC
Hi hurlee,
If you are asking about executing pre-requisites following is the script I used to do it.
Here I'm checking whether the .net Framework setup is available in the given path and if it's existing, setup will be installed. Otherwise whole installation will quit.
Section "-PreRequisites" ; Hidden section
SectionIn RO ; Read only component
ClearErrors
IfFileExists "$EXEDIR\Prerequisites\dotnetfx.exe" InstallDotNet NoDotNetFound
NoDotNetFound:
MessageBox MB_OK "Setup not found."
Quit
InstallDotNet:
SetOutPath "$INSTDIR\Prerequisites"
ExecWait '"$EXEDIR\Prerequisites\dotnetfx.exe" /q:a /c:\install /l /q'
SectionEnd
If you have more than one pre-requesites, I think it's better to define separate sections for them. Here I have define PreRequisites section as a hidden and read only one. You can decide that depending on your requirements.
I visited following links to find out parameters necessary for installation in silent mode.
http://forums.winamp.com/showthread.php?threadid=267834
http://blogs.msdn.com/astebner/archi...-packages.aspx
hurlee
30th March 2010 15:25 UTC
Thanks watzr
Sorry im not quite get it.
My application PreRequisites are .netframework 3.5 also it says Windows installer 3.1 and cards.dll do you think this is Prerequisite?(cards.dll?)
Because my apllication is very small so i just want to include them in it using NSIS. I thought most user dont like downloading from internet.I collected many other methods but still i m not able to do this. It was easy for me to deploy VB 6 application using NSIS .
watzr
31st March 2010 18:01 UTC
Hi hurlee,
Pre-requisites should be decided by you depending on your application. If you feel that the given files should be there to work with your application then you can consider them as Pre-requisites. You can run executables using "ExecWait" command, but for DLLs you can copy then to specific directory using "File" command.
If you wants to install your VB.net application with pre-requisites(pardon me if I didnt get your question) first Write sections to install Pre-requisites and then Write a section to install VB.NET application.
Section "-PreRequisites1" ; Hidden section
SetOutPath "$INSTDIR\Prerequisites"
ExecWait '"$EXEDIR\Prerequisites\setup1.exe" /q:a /c:\install /l /q'
SectionEnd
Section "-PreRequisites2" ; Hidden section
SetOutPath "$INSTDIR\Prerequisites"
File "<path>\cards.dll"
SectionEnd
In section PreRequisites1 setup11 will be installed in silent mode to a directory called "Prerequisites" in the installation directory.
You can specify "ExeWait" command as follows if you want to install in in normal mode.
ExecWait "$EXEDIR\Prerequisites\setup1.exe"
Above example will execute pre-requisites located in a given directory instead of downloading them. So you have to save those pre-requisites in that directory to accomplish the installation.
Otherwise you can embed pre-requisites to application installer too. But that's not a good idea if your pre-requisites occupy more space.
hurlee
2nd April 2010 11:43 UTC
Thanks WATZR
But can you show me example just using the prerequirements(.netframework 3.5 and windows installer 3.1) Do you think this win installer 3.1 is nessessary?
My App. will be muushig.exe and it will use the cards.dll
I really cant make it if i dont see real example.