How to prevent Inno Setup create files in TEMP? - inno-setup

I create a setup file with Inno Setup.
But some Anti-Virus software pause my setup and warn that my setup want to create files in TEMP folder.
I search around, and apparently, some virus loves to create files in TEMP folder as their first step to takeover the whole system drive. So some AV just assume that a software who create files in TEMP is most likely a virus.
Then I try finding out how to prevent Inno Setup creating files in TEMP folder with no luck.
So here I am. Is it possible to prevent Inno setup create files in TEMP folder?

Related

Adding MS Access and Excel files inside NSIS Installer package

I am creating an NSIS Installer package sample for a project I am working on. I need certain MS Access and Excel files to be automatically placed in the documents folder directory; "C:\User\MyName\Documents\PexApp\Storage", instead on my application having to connect to a network sharefolder to get the files. I want offline installation to be possible.
There are three excel files that are supposed to go to the PexApp folder and two Access database files that are supposed to go to the Storage folder inside the PexApp folder.
How do I add the files inside the installer package (if it is possible) so that they may be available for offline placement through the installer and what scripts or methods should I use or consider?
OutFile "MySetup.exe"
Name "MySetup"
RequestExecutionLevel user
Section
SetOutPath "$DOCUMENTS\PexApp"
File "Excel1.xls"
File "Excel2.xls"
File "Excel3.xls"
SetOutPath "$DOCUMENTS\PexApp\Storage"
File "Access1.db"
File "Access2.db"
SectionEnd

Application installed with Inno Setup writes files to unknown location instead of its installation folder

I try to make a setup with Inno Setup for my program.
I have installed more file XML in the same folder as the .exe. The install work well, but when I run the program and modify the XML, the file is saved in another place, not the folder of the .exe and I can't find it. I think the file is stored in the PC because the program can open it without problems.
I also try to make the same setup with InstallAware Express 7 and it works well. Io I think it's not a problem in my exe but in Inno Setup.
Thanks
I think you are a victim of Windows File virtualization.
You probably install data files to Program Files folder.
That folder is not writable (unless your program runs with elevated privileges). If your program does not have application manifest, Windows considers it a legacy application that is not aware of its inability to write to Program Files and enables file virtualization. So, when your application tries to write the data/XML files, Windows redirects the write (and future reads) to a virtual store (C:\Users\username\AppData\Local\VirtualStore). The actual files in the Program Files are not modified.
It's difficult to answer, why it works with the InstallAware Express. If you tried it after the Inno Setup, the results can be affected by an existence of the file in the virtual store.
Anyway, the root cause is that your application tries to write the files in the Program Files. That's just wrong. No application should write to Program Files.
See also Application does not work when installed with Inno Setup.

Inno Download Plugin - Only download updated files

I'm trying to find the best way of updating my program using Inno Setup and Inno Download Plugin (IDP). My program is around 3.5gb in size so finding a way where the user doesn't have to download 3.5gb everytime I release a 100mb update is really important.
Currently I have IDP downloading all the files for my program from my FTP using the code below:
procedure InitializeWizard();
begin
idpSetLogin('%%username%%', '%%password%%');
{Add all files in URL, including subdirectories}
idpAddFtpDir('%%myftp%%','', ExpandConstant('{tmp}'), true);
idpDownloadAfter(wpReady);
end;
What is the best way to deliver updates to users so that they only have to download the updated files and not all 3.5gb?
The Inno Download Plugin has no API to retrieve a timestamp of a file on the server.
So you have to solve it another way.
The easiest to implement in Inno Setup, would be to a have an online service (say a simple PHP script) that the installer will call with version a number of the installed program and version number of the program being installed. The service will list the files that need an update and the installer will act accordingly. Or you can have the installer send timestamps of all installed files, and the service to check the files one by one, listing those that need an update.
If you cannot build such online service, another option is have a static plain text file with list of files and their timestamp. Upload the files to the FTP server. The file will need to be updated everytime you update the files on the server. The installer will download the file, parse it and decide itself what files need update.

Synology DSM Backup - configuration file

I have 2 NAS DSM Synology 5.1 system and I want to make daily Network BackUp of first DSM to second one.
I am using Backup&Recovery tool from DSM GUI (aready have created shared folders, granted permission etc.) and when I go to the part where I can choose Shared folders I do not have option to select all shared folders (I can only pick one by one) and that is the problem - because if I create a new share folder, that new folder is not included in the next BackUP.
I have found configuration file (synobackup.conf) and in that file is:
backup_folders=["/folder1", "/folder2", "/folder3", "/folder4", "/folder5"]
So my question is:
How can I include all shared folders (existing folders and new created) to scheduled BackUp.
Can I type any command in "backup_folders=["XXX"] to select all shared folders. I have tried with *, $ but it does not work.
Thank you!
The best way is to get a time backup or a total backup.
Timebackups are more advanced then the default software, But therefor you have the option of restoring all the data.
A total backup is in case our NAS dies and have to reïnstall the OS.

How to copy files into AppData\Local\Temp in inno script

I have created an .exe file for my application using inno script. Here I want to copy files from my setup folder to the AppData\Local\Temp directory. This is done using the below code.
Source: "WebcamApplet_1-0-0\*"; DestDir: "{localappdata}\Temp\WebcamApplet_1-0-0"
The problem I'm facing is that this code is only copying the files into the sysadmin ie C:\Users\Sysadmin\AppData\Local\Temp (Admin), I have to put it in C:\Users\Manesh\AppData\Local\Temp(User) for my application to work. How do I solve this problem.
Your application is badly designed if it expects files to be installed to the Temp folder. This folder is so named because the user or the system are free to delete all files contained therein at any time -- it is therefore suitable only for temporary use.
Additionally, there is no reasonable and reliable way for a per-machine installer (one running with PrivilegesRequired=admin, which is the default) to install files or settings to per-user folders, including the per-user temporary folder.
If you really really want to do this, you should set PrivilegesRequired=lowest to create a per-user installer -- but bear in mind that this will introduce other restrictions, such as limiting where your application can be installed to. Provided that you are running with lowest privileges, you can then use {%TEMP} to refer to the temporary path.

Resources