Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem w/ ShellExecute
Message
From
03/10/2005 11:18:08
 
 
To
03/10/2005 10:14:17
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows NT
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01055500
Message ID:
01055516
Views:
9
Randy, from what I understand, shellexecute runs under the existing login. I think you need to use 'CreateProcess' or CreateProcessAsUser. I can post some code later.

Mace

>We are using LogonUser & ImpersonateLoggedOnUser functions to make our .exe's run in separate threads from the actual logged-on PC. This enables us to hide some directory access (i.e., from users trying to access the files externally, rather than by using the program directly.) We have just discovered that ShellExecute doesn't seem to function under this alternate login. We formerly used VBA commands in FoxPro, to open Word, Excel, etc., & that all works fine under the alternate login. We were hoping the use ShellExecute instead, to avoid needing to code specifically for each potential document type.
>
>Actually, to be 100% accurate, ShellExecute does work, but ONLY if the called-for application (Word, Excel, Windows Viewer, Internet Explorer, etc.) is ALREADY OPEN on the PC. What ShellExecute won't apparently do is open the called-for application if it isn't already open.
>
>Any ideas of how to solve this?
>
>Thanks,
>Randy W.
Previous
Reply
Map
View

Click here to load this message in the networking platform