General information
Category:
Windows API functions
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only