Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with CreateProcessWithLogonW
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00840676
Message ID:
00841592
Views:
33
Rodd,
I'm not sure I understand your solution so let me ask a couple of questions.

1. WRT to Option 1, when you launch the new process with CPWL, are you specifying a user context that has access rights to both PCs? So when you launch the new program, the peer machine is simply acting as a file server and the local machine is doing all the processing?

2. WRT to Option 2, the user context in question is simply a domain user that has access to both machines and once again the peer machine is just a file server?

If these two are true, this raises a security issue in my mind, although it may not be a problem in your scenario.

Where are you storing the user ID and password to use with CPWL? Internal to the EXE? In which case opening it in NotePad could yield that information. In the registry of the local PC? Better because you can bury it so far that finding the information isn't an easy task. In either case, if you encrypt it, you should be okay. If you used DCOM, the user context is buried in the registry of the peer machine with encryption.

>Hey Larry,
>
>Thanks for your input!
>
>Actually, with some time put into playing around with this, I found that I CreateProcessWithLogonW will allow me to:
>
>1) Run code on a network machine that will log on to a peer machine and launch a program from their machine (given that the login I use has proper permissions) even though the user logged in on the first machine has no login or rights on the peer machine.
>
>2) Log on to a domain from a client machine of that domain and launch a program on that domain. The cool thing about this is that CreateProcess... allows me to log in as a user that DOES have rights to data and thus allows my program to manipulate data for which the user running the program does not have rights.
>
>The only thing I have not been able to get to work is to get my CreateProcess... code to run on a machine that is not part of a domain to log into a domain as a valid user on that domain and execute a program on that domain.
>
>Something that I have not tried yet is logging into a non-microsoft server via CreateProcess ...
>
>Guess what I'm saying is CreateProcessWithLogonW will allow me to do what I was asking to some extent. Guess a lot of it depends on how ones network has been set up.
>
>In retrospect, I probably should have mentioned that everything I wanted to do was in respect to a LAN. I wasn't trying to log into machines outside of our LAN.
>
>Thanks again for your input though!
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform