LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Set permissions in exe file contained in dir "programs files"

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

0 Kudos
Message 1 of 4
(4,097 Views)

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.

0 Kudos
Message 2 of 4
(4,088 Views)

@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".


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 4
(3,995 Views)

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.Configuring the installer to allow an application to update Windows protected folder files.

 

Regards,

Jeff Long, President
AutomationWorks, Inc.
http://www.automationworks.com
Message 4 of 4
(3,810 Views)