LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

SetSystemDate and SetSystemTime

I have a CVI 2017 application that needs to run in kiosk mode.  It needs to allow the operator to set the system date and time from the user interface.  I have found on Win7 that calls to SetSystemDate() and SetSystemtime() fail if the application is not launched "Run as Administrator".  Even if the login account is an administrator, this must be invoked. 

 

Is there some way force this upon application launch without the operator having to do it via right-click?  I have found that one can select in Properties that one can select "Run as Administrator", and once I have a deliverable product that can be done.  The bigger question though, is there some way to tell CVI to always create .exe files that invoke that, so that it does not have to be done manually?

0 Kudos
Message 1 of 2
(2,335 Views)

Maybe these other posts will be helpful:

 

CVI Applications under Windows 7.
https://forums.ni.com/t5/LabWindows-CVI/CVI-Applications-under-Windows-7/td-p/1546756

 

"My understanding is that if you're logged in as "administrator", then all programs that you launch will automatically run with adminsitrator privileges (aka "elevated"), and you will not see any prompt or UAC-related failures. If you're logged in as any other user, however, even if it's a user with administrator-level access to your computer, then your programs will not run in elevated mode unless you right-click on the shortcut and select "Run as administrator" or unless the program has an application manifest embedded that instructs it to run as administrator.

 

Finally, while you as an administrator-level uses can disable UAC at the OS level, globally, there is really nothing you can do as a programmer to enable any individual non-elevated program to circumvent UAC enforcement. This would be a major security gap if it were allowed."

 

set vi or exe to run as admin
https://forums.ni.com/t5/LabVIEW/set-vi-or-exe-to-run-as-admin/td-p/2347350


Here, people discuss this with an EXE created in LabVIEW, but some info is still relevant.

0 Kudos
Message 2 of 2
(2,298 Views)