LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW program use administrator rights

Hi all,

My question is as follows, can we have a LabVIEW program use administrator rights without forcing the user to have administrator privileges.  By having the program function this way, we would be able to prevent un-authorized users (without administrator rights) from accessing our networks, but they could use the LabVIEW program.  The program accesses a time sync server to reset the computers time prior to runs, which requires administrator privileges.

All programs will be running LV 7.1 on Windows computers.

0 Kudos
Message 1 of 20
(9,230 Views)
In windows, you can right click an application and select "Run As..." and then you can run it under any account you want.

You can also setup a shortcut to do this as well, but I'm not sure if you can have it automatically log into that admin account for you or not, you might have to type the password.
Message 2 of 20
(9,221 Views)

Hi jim,

The attached VI will launch an application as a different user.

With it, you could build a VI that launches the app needing priviledges.

Since any user can launch this VI, they don't need to know the admin's password to run the target with admin priviledges!

Cheers.  

When they give imbeciles handicap-parking, I won't have so far to walk!
Message 3 of 20
(9,207 Views)
Works for me (XP and 6.1 {todays version}), nice and you posted it in at least 6.1.... cool so just about anyone can use it... well worth at least 3 x 5off stars. I put in 5 from my limited budget Smiley Wink
0 Kudos
Message 4 of 20
(9,203 Views)

Thanks, Conseils.  It was a nice surprise to see those stars so quickly! Smiley Happy

Cheers!

When they give imbeciles handicap-parking, I won't have so far to walk!
0 Kudos
Message 5 of 20
(9,200 Views)

Hi Jim, Conseils,

      Please consider using the attached Launcher2.vi  It closes thread and process handles associated with call, allowing Launcher2.vi to be calleded multiple times without incurring a memory leak.

Cheers.

When they give imbeciles handicap-parking, I won't have so far to walk!
Message 6 of 20
(9,187 Views)
Nice documentation there, as well as including the KB references....
Well done ........
0 Kudos
Message 7 of 20
(9,181 Views)
Attaching [tested] Launcher2_1.vi - with much egg-on-face. Smiley Tongue
2_1. actually uses the Command-line parameter.
Excuse: This VI went through many revs before Launcher2.vi went into production app.  A nice, general-purpose version that accommodates empty-string arguments seems to complicate matters, as arguments passed to CLF change.
Non-empty strings require array-inputs, and empty strings require U32 inputs set to zero (null pointer.)(?)
 
Apologies, Conseils!
 

Message Edited by Dynamik on 04-02-2006 05:12 PM

Message Edited by Dynamik on 04-02-2006 05:13 PM

When they give imbeciles handicap-parking, I won't have so far to walk!
Message 8 of 20
(9,178 Views)
Only those that never try, never make errors.....
To the rest of us poor mortals, mistakes are no stranger.
To have left it and said nothing would have been the true sin.
 
Using code node interfaces is damm hard work and then trying to interface to Microsoft stuff normally gets one very badly burnt. To this I am no stranger and I have the utmost respect for anyone who tries and succeeds. You have gone the extra mile, for the original participant and that's to be respected. It's easy to find bugs in other peoples code, my code never has bugs in it, honest Smiley Wink .... . Perhaps I need new glasses.Smiley Tongue
 
Again, well done.
And as I said at least 3 by 5 stars, no probleme.
0 Kudos
Message 9 of 20
(9,154 Views)

Thanks all for answering so quickly. We would like to do this through LabVIEW and the dll looks like the way to go. When I tried the program, it gave me an error. Looks like my program as I read up on the dll and it looks good. I will try again later. Again, thanks for pointing us in the right direction.

0 Kudos
Message 10 of 20
(9,124 Views)