05-27-2017 10:12 AM
Hello everyone, is there a way to modify the permissions of an exe file (created with labview) contained within the dir "Program Files" to update an exe on the fly?
I would like to make an automatic program update procedure.
I tried without success:
LV: File I/O - Advanced File - SetPermission = NO CHANGE
DOS: attrib -r C:\Program Files\Test.exe = NO CHANGE
SOS
Tank you
05-27-2017 10:34 AM
Is your username set up as an administrator on the PC? I'm sure Program Files is one of the protected directories that only admins, or programs running under admin mode can modify.
05-29-2017 03:46 AM
@RavensFan wrote:
Is your username set up as an administrator on the PC? I'm sure Program Files is one of the protected directories that only admins, or programs running under admin mode can modify.
Even then, you will likely need to "run as administrator".
10-26-2017 09:16 PM
Hi.
I recently created an application updater in LabVIEW.
I was able to overcome the Windows "Program Files" permissions problem by checking the "Unlock" checkbox in the "File and Folder Attributes" area of the "Source File Settings" page of the application installer creation utility. I checked this box to unlock each of the folders that I will want to be able to update in the future. See image below.
By default, folders within the [Program Files] and [Public App Data] folders ("Program Files" and "ProgramData" in Windows) have the "Unlock" checkbox unchecked, and cannot be written to except by an administrator.
After making this change and executing the installer, my file permission problem, the dreaded Error 8, was gone.
I hope this helps!
Configuring the installer to allow an application to update Windows protected folder files.