Skip to content
⌘ NSIS Forum Archive

Can I do these things?

4 posts

mrhobbeys#

Can I do these things?

I would like to use NSIS to distribute my program but I am completely new to installers.

Currently I am wondering if I can check that needed programs are already installed like java, powershell, and adobe reader and if not automate the install. Additionally is it possible to uninstall old unsupported versions and update to newer versions of the mentioned software?

To throw a curveball the powershell version will be different depending on the version of windows.

Can these programs be downloaded only as needed or do I need to "package" them with the installer?

After install of my program and scripts there are 2 powershell scripts can the installer open powershell and run "set-executionpolicy remotesigned" and then run the scripts?

Please note I am new to making installers if you know what something should be called, or the documentation I should be reading I would very much like to know.
shadowpoa#
some directions...

All that you sad is possible... but none is 'pre built' on nsis.. you have to do it by yourself...

The forums have basically all the answers that you need and the people here are always glad to help..

Start here:


And here:


And dont forget to play with the examples on folder %programfiles%\NSIS\Examples
garetjax#
Powershell on any windows based pc newer than XP will have Powershell 1.0 installed by default. All other's will require downloads through Microsoft; cannot come from a third party else the distribution will be 'flagged' as 'dirty'.

Additionally, Powershell scripts are by default blocked from doing execution level scripts unlessed they are signed. Also, with powershell there tends to be no need to do an install as the scripts themselves utilize functionality already within the system. Unless, you are planning to do something unscrupulous with your install.

Otherwise, powershell scripts will run pretty much without issue; Of Note though the .ps1 files are blocked by default; are disallowed to run with powershell unless signed and are essentially sandboxed unless full-control has been given.

Microsoft TechNet is a better information source for powershell. Though, if it could run and had appropriate permissions; you really can do anything with it.
mrhobbeys#
You are right here. I have found ways around some of my problems using PowerShell. I never got my NSIS script where I wanted it to be and ended up dropping it until recently. I want to take another stab at it.

First thing, I will be looking for is how I can run my script via NSIS.