Inno Setup - How to set full permission on a folder, not just for it's contents - permissions

My kit created with Inno Setup installs my application in C:\Program Files\MyApp.
When my application starts, it tries to create new log files in C:\Program Files\MyApp\logs\ but it fails.
In my Inno script i have the following settings:
[Dirs]
Name: "{app}";
[Files]
Source: logs\*; DestDir: {app}\logs\; Flags: ignoreversion recursesubdirs createallsubdirs; Permissions: everyone-full
This gives full permissions on all files inside logs folder, but not on the folder itself. So, when my application tries to create a new log file inside that folder, it fails.
How can i set full permissions on the folder as well, not only on the existing files in it?

Setting permissions for logs folder under [Dirs] section worked for me:
[Dirs]
Name: "{app}";
Name: "{app}\logs"; Permissions: everyone-full
[Files]
Source: logs\*; DestDir: {app}\logs\; Flags: ignoreversion recursesubdirs createallsubdirs; Permissions: everyone-full
But, as in this post, i'm not sure if it's the proper way to do it.

Simply using the following code works for me and I think it is more secured:
[Dirs]
Name: "{app}\logs"; Permissions: users-full

Related

How to store CodeBuild output artifact in S3 bucket folder with the folder name as build-date

I have a codebuild project which creates a binary distribution wheel stored in the dist directory.
My Codebuild project buildspec [relevant lines]
artifacts:
files:
- "*.whl"
name: $(date +%Y-%m-%d)
#discard-paths: yes
base-directory: 'dist'
Artifacts
Type: S3
Bucketname:
Name:
Path: path/to/folder/in/s3/bucket
Artifact packaging: None
The codebuild project runs successfully but the output artifact is not in the directory with the date.
In order to use the folder name as defined in the buildspec.yml, the semantic versioning needs to be enabled.
I had to enable that in the Artifacts section of the CodeBuild project
Try something like this:
# Artifacts
artifacts:
locaton = aws_s3_bucket.myapp-project.bucket
type = "S3"
name = "YourFilename.json"
path = "assets/translations/"
packaging = "NONE"
In Summary, your missing the S3 bucket location if you are not using a codepipeline. A similar article can be found here

Inno Setup 6.0.3 recursesubdirs can't handle chain of subdirectories without standalone files

Source: "C:\folder1\*"; DestDir: "C:\folder1"; Flags: recursesubdirs;
The above line can't handle the following file structure:
C:\
folder1\
folder2\
folder3\
in each subdirectory, there is no standalone files, except a subdirectory. In Inno Setup, it gives the following error:
No files found matching "C:\folder1\*"

Using NPM and packages paths with Grunt

I am using Grunt and it is watching files in my src folder. However the baseDir is set to src so it is serving files from that point, however it can't see back to the node_modules folder.
How can I set grunt to serve from the correct folder but load the necessary packages that I need to load from the node_modules folder?
Sounds like what you mean is that you're using grunt to start a local web server? If so, then there isn't a good answer for you as a web server will only have access to files in its base directory. That said, if you need to access a file in node_modules/ from a web request you could add a copy task to move those files into a subdirectory within your baseDir.
Here's an example of using jQuery via node_modules - in your Gruntfile.js:
copy: {
vendorJS: {
files: [{
expand: true,
cwd: 'node_modules/jquery/dist/',
src: ['jquery.js'],
dest: 'src/vendor/'
}]
}
}
Then you would need to change how you pull in that file in the browser to match the src/vendor/ directory.

Wix bundle uninstall package with custom install location

I have a Wix bundle which allows users to customize installation directory and passes the value to the package during installation. This is implemented using the approach described in this answer: How do I pass a default 'install location' to the RtfLicense bootstrapper?
If the user does not change install directory after running bundle and uninstalling it all files are deleted as expected. If the user does select another installation directory and runs bundle and uninstalls the app the files are not deleted. I guess this happens because the bundle passes default directory but it obviously isn't there. What's more the shortcut that's created during installation is deleted as the shortcut location does not depend on the installation directory.
How can I solve this issue?
The "install location" is not saved by the bundle. The packages have to save anything they need upon installation and read it back during other operations. For an MsiPackage, this is typically done using the "Remember Property" pattern. Directory paths are manipulated as properties so save any directory paths you need.

WiX Managed Bootstrapper “Failed to resolve source for file” for .cab files

I have an .msi package with 5 external .cab files in my bootstrapper application(not being compressed in my bootstrapper application, external) which installs well locally, and has DownloadUrl attribute for web-based installation.
But, when I execute my bootstrapper application without its .msi file and .cab files(not accompanied by them in the same folder, i.e., executed solely in a separate folder), it cannot download the .cab files although it can download the .msi file(log files says that).
So, I added <Payload> elements for each .cab file under <MsiPackage> element with DownloadUrl attributes set to their individual URL and Compressed attibutes set to no. And then, when I execute my boostrapper application solely, it downloads all its files well and installs well.
Should I manage all the <Payload> elements for .cab files in <MsiPakcage> manually? No automatic download for .cab files?
I had written only .msi file path in DownloadUrl attribute of MsiPackage element. But in the source code of Wix Setup BA there was a substitution '{2}' meaning the file name of payload. I followed that and it solved the problem.
For more info see this link.