LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Starting exe as another user

Hi Wiebe,

 

I feel the pain. We had issues with computers coming back from 'the field' after a few months with outdated pass-words. Finally after sitting almost every week with IT-support, they allowed us to have a generic user with a pass-word that doesn't expire.

Another option is to create a group in AD (assuming they use Active Directory) that only is valid on a specific PC (don't know if that is possible) that has access to those data.

OR create your own proxy by placing an app on a server that talks to the files, and pipes info to the client computers.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 11 of 20
(1,845 Views)

Wiebe

you can start any program this way. I have some of those command files on my machine since a lot of them need admin rights. Mostly because they try to open a raw stream to the CD/DVD drive to check for the original CD or for access to the registry. The Sims and most of the older Lego Media games are candidates for such a solution.

 

I don't know if it will work with explorer .exe since it is started normally as the shell of Windows.

 

I know two products which install additonal users. One is the MS SQL Server. You will always will have a special SQL Server admin account on the machine. Another is Sophos a virus scanner. It installs two users SophosUser and SophosAdmin during the setup.

Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 12 of 20
(1,838 Views)
CPAU works just fine!

It also has a nice license, although it is not allowed to spread the exe
outside a company, and to use it without the license file. It is free for
any usage, so it's very liberate.

I tried to put it on our ftp site, but the client couldn't get it from there
(file was 0 kB after download)! So, finally they downloaded it themself, and
it worked. Probably my punishment for trying to violate the license!

I'll post the VI, but the CPAU has to be downloaded from www.joeware.com .

Thanks for all the input,

Wiebe.


0 Kudos
Message 13 of 20
(1,837 Views)

"dan_u" <x@no.email> wrote in message
news:1233592813642-845342@exchange.ni.com...
> This doesn't sound that nice...Probably there are other tools around that
can do the same?&nbsp;A quick search also returned <a
href="http://www.tek-tips.com/faqs.cfm?fid=2760" target="_blank">vbs
script</a>. This just programmatically enters the password in the runas
dialog box. &nbsp;Daniel&nbsp;

I tried to implement the VB script in LabVIEW, and got it working.
Unfortunatelly, runas doesn't exept the keys send by SendKey. So I think
we're down to the same problem, runas doesn't work when called, direct or
indirect, by anything other then a command line. So calling a script from
the cl would work, but calling the same script from a cl started by LabVIEW
won't...

I know the code is working, since I can send keys to a cmd.exe dialog, but
not to a runas.exe dialog...

Regards,

Wiebe.


0 Kudos
Message 14 of 20
(1,837 Views)
For some strange reason, IT support think the people are working for them,
instead of the other way around. It's often a stuggle to get something done,
although in this case IT was willing, but not without budget.

For now CPAU works, so the pressure is off. I might do some more
investigation, because I like to know why it works, and how to do this with
API calls directly from LabVIEW. I just got rid of all external dependancies
(winzip cle, several ocx's), so I really don't like to use another one.

I'm not sure if they use AD, and creating a server isn't an option. Also,
the application needs to work on several PC's, and the users aren't allowed
to do what the application is allowed...

Regards,

Wiebe.


0 Kudos
Message 15 of 20
(1,831 Views)

"waldemar.hersacher" <x@no.email> wrote in message
news:1233745819656-846643@exchange.ni.com...
> Wiebeyou can start any program this way. I have some of those command
files on my machine since a lot of&nbsp;them need admin rights. Mostly
because they try to open a raw stream to the CD/DVD drive to check for the
original CD or for access to the registry. The Sims and most of the older
Lego Media games are candidates for such a solution.&nbsp;I don't know if it
will work with explorer .exe since it is started normally as the shell of
Windows.&nbsp;I know two products which install additonal users. One is the
MS SQL Server. You will always will have a special SQL Server admin account
on the machine. Another is Sophos a virus scanner. It installs two users
SophosUser and SophosAdmin during the setup.

But it doesn't work when started from LabVIEW, and/or the credentials change
when the password expires each month. So, I'll stick with CPAU.

Also, I think those users that other programs create are local users, and I
need to log in as a user in a domain.

Regards,

Wiebe.



0 Kudos
Message 16 of 20
(1,818 Views)
> Wiebeyou can start any program this way. I have some of those command
files on my machine since a lot of&nbsp;them need

Sorry for the confusion, I didn't get that last remark.

What I ment was:

If you do "runas /user:admin /savecred theapp" and type in the password, is
the credentials file that is created linked to the file you start? Or can
you start any file with the same credentials file, so withouth having to
reenter the password?

Regards,

Wiebe.


0 Kudos
Message 17 of 20
(1,814 Views)

Wiebe wrote:


If you do "runas /user:admin /savecred theapp" and type in the password, is
the credentials file that is created linked to the file you start? Or can
you start any file with the same credentials file, so withouth having to
reenter the password?

 

I checked this with another app just to be sure. You need to enter the password only once per user and it will work for each app.

Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 18 of 20
(1,789 Views)

"waldemar.hersacher" <x@no.email> wrote in message
news:1233850206495-847647@exchange.ni.com...
> Wiebe wrote:
> If you do &quot;runas /user:admin /savecred theapp&quot; and type in the
password, is
>
> the credentials file that is created linked to the file you start? Or can
>
> you start any file with the same credentials file, so withouth having to
>
> reenter the password?
>
>
> &nbsp;I checked this with another app just to be sure. You need to enter
the password only once per user and it will work for each app.

That seems very dangerous! So basically, with a credential file, the user
can do everything? Like, start a command line, and in that command line
start explorer? Sounds like MS messed up...

If those kids find out...

Regards,

Wiebe.


0 Kudos
Message 19 of 20
(1,777 Views)

That is why you have to change your password every 10 days Smiley Very Happy

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 20 of 20
(1,772 Views)