is it possible to tell NSIS to setof files listed in a config file? - nsis

I have to download different files from a location on the network, http, but the file names versions I want to supply in a configuration file. is this possible ?

You can read from files with the NSIS ini instructions, manual parsing with FileRead or use one of the helper macros.
You can download files with the INetC plugin...

Related

How to make a list of file extensions read only in JetBrains IDEs?

I have a code generation tool (build_runner) that generates source code based on existing source files.
Every generated file is meant to be read-only.
How to tell JetBrains IDE to prevent me (as a developer) to edit those files? (or at least warn me a confirmation dialog before I actually edit the file)
Those files are identified with specific extensions
*.generated.dart
*.unwrapped.dart
Make your tool set file permissions on the files it generates: chmod 444.
Make your tool put the files in the generated folder like other libraries do.
Sample from Android Studio after setting the file permission on this file and trying to edit it:

Count Files Inside NSIS

I have a NSIS executable files and I just want to list the numbers of files inside each of the files.
Is there any way on how to determine the count of files inside the setup.exe or NSIS files without extracting it?
NSIS itself does not support this.
7-zip is able to understand most NSIS installers and you can use their command line tool to get a file listing.

How to read the contents of a packed file when the uses cancels an NSIS installation?

I want to report to a Web Service whether the installation completed successfully or not. The identifiers that need to be passed to the service are stored in an uncompressed text file along with the other (compressed) files. Everything works on a successful installation, but when the user cancels the installation, no files are extracted (as expected) and I am unable to find a way to extract a specific file from the archive.
I have considered some other options (writing a custom plugin, parsing through the installer executable file), but I hope there is a cleaner solution.
You can extract files at any point in the installer, in your case probably in .onInstFailed or .onUserAbort:
Function .onInstFailed
InitPluginsDir
SetOutPath $pluginsdir
File something.ext
; Do something with "$pluginsdir\something.ext"
; Note: $pluginsdir is automatically deleted when installer quits...
FunctionEnd

Identifying file updations in NSIS

In NSIS is there any way to identify whether the application file is modified from the user side while updating the application using installer?
My requirement is while updating the application, we need to give warning message in case of user modify the application file. If 'Yes' we need to update the file, otherwise we should not update.
You probably have two options; you can get the modified time with GetFileTime or use something like the MD5 plugin (md5dll::GetMD5File).
You could save the original values in a .ini when you install and then compare with these values when updating...
Use archive attribute. Archive attribute is there especially for such purpose.
Below steps demonstrates the behaviour of archive bit:
Unset archive bit of any file in your pc, using Properties > advanced > untick "File is ready for archiving"
Edit and save the file with an appropriate tool. For example Notepad for a text file.
Note that archive bit of the file is set, signalling that this file is modified.
So the method will be like this:
Unset archive bit of all necessary source files in NSIS compiler PC
In NSIS script use [File /a] to extract the source files to destination computer preserving attributes
While reinstalling use GetFileAttributes to detect if the file is modified or original and take steps accordingly.

Create a setup.exe file without any dependent files

I am a first time user of this group and so pardon me for any mistakes and unclear statements.
What I am trying to do is to create single setup.exe (not msi) using installshield. But when I build the project what I get is other files along with the .exe file for e.g. .cab, .hdr, .inx and other such files.
I am using the options under Release -> Release Wizard -> General options-> Checked the "Create a single file executable" & "Compress compiled script" options but still I get the extra files along with the setup.exe file. I want a setup.exe file to be created independent of the other local files.
So could anyone suggest me how to achieve that.
Any help will be appriciated.
Thanks.
As Michael Urman wrote, you will find the one file in adjacent folder.
The folder name is "Package".
Those files are always created for InstallScript projects. When you build a single file executable, the single file version that packages it all together is available in an adjacent folder.

Resources