Make files and folder nonreadable to users after MSI install

Use this forum to ask questions after your subscription maintenance expires or before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
This topic is 2 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
mar10c--
Posts: 59
Last visit: Mon May 22, 2023 6:53 am

Make files and folder nonreadable to users after MSI install

Post by mar10c-- »

After the MSI completes the install in say c:\program files\myprogram\softwarename. Is there a way to restrict users from being able to read the contents of the installation folder? I've seen programs where the files have custom extensions to protect proprietary information in the code. Do we have these options in powershell studio 2019? If not, are there alternatives ?
User avatar
Alexander Riedel
Posts: 8473
Last visit: Tue Mar 19, 2024 1:15 am
Answers: 19
Been upvoted: 37 times

Re: Make files and folder nonreadable to users after MSI install

Post by Alexander Riedel »

A folder and files from which you wish to execute code must be readable. If the OS cannot read a file, it cannot execute it. There really is no way around that.
You didn't provide a lot of detail here, so there is some guesswork involved here.
Renaming a .ps1 file to .xyz it does not make it any less readable by a text editor.
You can package a script as an executable with PowerShell Studio. Using a SAPIEN script host will not create temporary files and the code cannot simply be opened and studied and most importantly it cannot be modified. I do not know what proprietary information you have in your code, but if you have credentials there, they are not safe in any case. Packaging may make it harder for the average user to discover, but not impossible.
If you have truly sensitive information there, I would recommend to install that information in encrypted files and decrypt and use that information as needed, leaving no permanent trace behind.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 2 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.