Archive: Network installs


Network installs
I just completed an installer that pushes stuff across the network. I had to resort to some ugly calls which use psexec and ExecWait. Are there any plans to implement some remote-install routines, or tweak some of NSIS functions such that it is more net-friendly?

Currently, I had to jump through a ton of hoops to get it to work the way we needed to. There are a lot of areas which would have made things lots cleaner.

Firstly, finding out how much free space existed on the network drive needed a system call, using DriveSpace returns zero.
Ex:
System::Call '${sysGetDiskFreeSpaceEx}(r1,.,,.r2)'
; convert the large integer byte values into managable kb
System::Int64Op $2 / 1024
Pop $2

Secondly, I needed an external call to psexec (see sysinternals.com, which is now a part of microsoft). It basically copies a file to the Admin$ share of the target computer, then executes it on the local machine (and allows you to pass command-line flags, specify working directory, etc.).
Ex:
ExecWait '"$INSTDIR\psexec.exe" $Machine -w c:\Translator -c TranslatorSetup.exe /S /D=c:\Translator' $0

Anyway, the second call brings up an ugly DOS box while it executes, and you need to have the separate installer, play hopskotch with the separate install to get it to a temp directory, etc. Plus we have to do a bunch of stuff using net find as external calls to validate names and find computer groups within our domain and such. Something a bit more embedded within the control of the installer would be kind of nice.

Thanks,

-Kevin


You can use nsExec or DosExec to avoid the DOS box.

I don't see this as part of NSIS duties. Pushing installers to computers on the network is a job for something that could be better at that instead of an installer that'd drop an installer on another computer and remotely execute it. Something like SMS should be built or used. It can be a complement product for NSIS that might be closely integrated, but doesn't seem fit to be a part of NSIS.

That said, I'm all for more power. So if small things can be done to make something simpler while still keeping other things simple and small, it can be considered.


Capability to push the installer would be awesome, like use a flag and specify the target computer. Setup.exe /T=\\PC104_TEST /D="c:\Program files\foobie" or something like that. It probably wouldn't be that much work in reality.

I have been doing silent installers for quite some time using NSIS, and there are a ton of ways to make improvements (not that it isn't great). Network install capability and the language are it's greatest shortcomings, when compared to other installers. I just wanted to pitch a few ideas to help keep NSIS in-line with the competition.

Anyway, for what it's worth. My installers usually have a ton of hacks in them just to make the outcome the way I want it to be. It would be nice if some of these things made it into the language out-of-the-box.


Adding such a parameter to the installer would be replicating psexec, which is not a simple application and doesn't fit, in my opinion, in the installer itself.

As I said, minor features that might help get this done easier and might help other things as well, we can consider. But something that does exactly this and serves no other purpose has no place in the basics of every installer, in my opinion.