I basicaly want to have an external very large (bigger than 2gb) file next to my setup executable. To realize this, in the script I have tried the following:
File "$EXEDIR/verybigfile"
However, I got the following error:
File: "$EXEDIR/verybigfile" -> no files found.
Is it possible to do this in NSIS or do I require a plugin to realize this?
Thanks.
The File instruction cannot use variables like $EXEDIR, it needs the local path on your machine but you will hit the 2 GiB limit because these files are stored inside the installer.
If you are shipping a DVD or something like that you can use CopyFiles /SILENT "$EXEDIR\files\*.*" "$InstDir" to copy files from a DVD to the users system. This instruction does not support any kind of decompression, it is just a plain copy operation.
You need to use a plug-in to extract from .ZIP/.7z files.
Related
I've installed Raspbian OS in my PC ,so all my data in windows 10 drives is may be deleted . Do I recover that ? (in a very critical situation)
I assume that you didn't wipe the disk. I also assume that you stopped using your disk immediately to avoid overwriting your files.
Teskdisk will not work for you. But scalpel will. I will explain two ways to use it, depending your sources and your tools.
First, I assume that you have another laptop/desktop with a linux OS and a SATA to USB converter. If these apply to you, for faster results, do the following.
Extract the disk from your PC
Connect it via USB to another PC
Install the package scalpel
With your favourite editor (vi/vim/nano, etc) open the file /etc/scalpel/scalpel.conf and uncomment the preferred lines
Run the following command ( scalpel /dev/sdX# -o output ) which will scan your disk and find any selected file type that is not overwritten but it may find some corrupted files.
Secondly, I assume that you have a USB disk with a linux iso. This way is cheaper but slower. In that case, do the following.
Boot from the USB to the linux OS
Install the package scalpel
With your favourite editor (vi/vim/nano, etc) open the file /etc/scalpel/scalpel.conf and uncomment the preferred lines
Run the following command ( scalpel /dev/sdX# -o output ) which will scan your disk and find any selected file type that is not overwritten but it may find some corrupted files.
The folder named output will be in the path from which you ran the command scalpel. In the folder named output will be a txt file named audit.txt and folders with the selected types you searched for and inside them the recovered files, many of which will be corrupted.
Wish you luck!
I am currently working on a Windows batch file that will allow me to silently install git (the executable for which will be placed in the folder that the .bat file will be running from) in a pre-specified location on the file system.
I've found this article which seems to provide some suitable advice:
https://github.com/msysgit/msysgit/wiki/Silent-or-Unattended-Installation
However, I'm not entirely sure what parameters I would need to mention in my LOADINF file. I would like to pre-define the options that the user would manually select throughout the various stages of installation, so that it can run through from start to finish without prompting anything from the user.
Can anyone help or point me to a place where I can find these parameters and their available values?
Create a file, for eg. my-config.cnf (or my-config.ini) with the following content:
[Setup]
Lang=default
Dir=C:\Program Files (x86)\Git
Group=Git
NoIcons=0
SetupType=default
...
<other options as shown in the msysgit wiki>
Now, in the batch file, when you execute the installation file (say msysgit-install.exe), use /LOADINF as follows:
msysgit-install.exe /SILENT /LOADINF="my-config.cnf"
I have a setup exe, and I want its .msi file for administrative installation (see https://superuser.com/questions/307678/how-to-extract-files-from-msi-package)
But, although I see at the beginning the extraction of .msi, I can't find it.
Where is the location of this file?
Usually MSI file(s) might be extracted in different temp locations depends from who was launched (User\System\etc) and how configured setup.exe. Sometimes you can extract it with help of different command-line switches for setup.exe.
The simple way to check - launch it under user account, go to %temp% folder, most likely there should be created folder with {GUID_view_name}. Inside this folder you will find MSI file.
User's %temp% folder has different location in different Windows versions:
Windows XP\2000\2003:
"C:\Documents and settings\{user name}\Local settings\Temp" or "%userprofile%\local settings\temp"
Windows Vista\7\8\2008\2012
"C:\Users\{user name}\AppData\Local\Temp" or "%userprofile%\appdata\local\temp"
P.S. Also you can check this SO question-answer.
Snapshot a clean VM and use a program such as Install Watcher or InCntrl to record the current state of the file system. Run the setup.exe until you are on the first dialog of the MSI and take another recording. Diff and look for where the MSI and related support files appear.
I found a much better solution, Igor, gave me the idea.
I used ProcessMonitor and filtered with Process is "msiexec.exe" and Path ends with ".msi".
I found the msi in:
C:\ProgramData\Downloaded Installations\{41A70E83-DA5D-4CA6-9779-73C9330E3D13}\IQProtector64.msi
I can successfully extract Cabinet files (.cab) using the Windows tool Expand.exe.
Expand.exe foo.cab -F:*
I now want to modify some extracted files and rebuild a Cabinet file from the directory structure.
I found MakeCab.exe and CabArc.exe and tried MakeCab.exe but it doesn´t work.
(There are several files with the same name in different subdirectories and MakeCab.exe doesn´t like that. But the directory structure and the files come from a Cabinet file, so it has to work somehow.)
For extraction I also tried the Linux tool cabextract, which gave me another output with less files/directories extracted.
So I assume there are files in the Cabinet file which also are archived and Expand.exe extracts them too.
So how can i extract, modify and rebuild a Cabinet file?
(The Cabinet files come from WSUS / Windows Update.)
It's not supported to modify a Windows Update (WU) CAB. The CAB files you download from WU are digitally signed by Microsoft and Windows will refuse to install them if the signature is invalidated. Additionally, without special configuration the WSUS server will also realize the CAB files have been modified and re-download fresh copies from the upstream server or MU.
To my surprise, there seems a software from ACD: ACDzip (now discontinued program) that CAN MODIFY the .CAB files.
You can make cab file by using makecab.exe in cmd, if you have multiple files,then you can use makecab file directives to add files to .cab file.
makecab /f name.ddf
The Directive file (.ddf) is
.Set CabinetNameTemplate=cabName.cab
.Set SourceDir=PathWhereYouWantToMakeCab
.Set Cabinet=on
.Set Compress=on
"file1name.txt"
"file2name.txt"
See my answer to this question:
C#/.NET: Creating a CAB and adding files to it without an external library
However, as BenH points out in his answer, the resulting cab file wouldn't work as a substitute WU cab file. But, if all you want is access to the FILES AND FOLDERS inside the WU cab file, e.g. DLLs or driver files, etc. then the approach I described should get you there.
For the approach in my linked answer, note that the CabMaker app is a GUI wrapper around the the MakeCab program and handles the DDF file creation and the MakeCab command line creation for you. Below is what the CabMaker GUI looks like.
I suggest MakeCab.exe is best tool to create the cabinet files.
You should rename your source files.
I have an old setup of the old program written on c++ which contains multiple installation files files.
_SETUP.1
_SETUP.DLL
_INST32I.EX_
_ISDEL.EXE
SETUP.EXE
DISK1.ID
SETUP.INI
SETUP.INS
_SETUP.LIB
SETUP.PKG
I want to combine all that in to single executable file and i want to execute SETUP.EXE when user would run that single executable. Is it possible to achieve somehow?
The easiest way is simple create archive and say to user to to unpack that and to run SETUP.EXE but i am just wondering may be i can create setup like i describe above.
IExpress.exe is ideal for your job. Google for samples. It is included in your Windows installation. Just open a Command Prompt and type iexpress.exe - this starts a wizard that helps you getting started.