Re: Is there a VFP command without using RUN ?
- From: "Stefan Wuebbe" <stefan.wuebbe@xxxxxx>
- Date: Fri, 9 May 2008 08:04:12 +0200
"WP" <wp_nospam@xxxxxxxxxxxxxxx> schrieb im Newsbeitrag
news:%23ejp76UsIHA.3616@xxxxxxxxxxxxxxxxxxxxxxx
In my VFP9 application I use yy='explorer /e,/select, '+x2 where x2 is a variable
folder. Then I issue RUN /N &yy. I would like to know if there is another way of
invoking the explorer and have it open a given folder. I ask because my whole
application runs with impersonation, that means that the user behind running the
application is not the same as the Windows user. With that impersonation my command
described above does not do anything. It doesn't give an error, but it does not open any
explorer, nothing.
In addition to Bruce's comment - you can use ShellExecute()
instead of !|RUN.
Your case is a special one though, since explorer.exe refuses
to "run as..." in a secondary instance with elevated privileges.
On WinXP with Internet Explorer 6, you can start iexplore.exe
instead.
With IE7, that does not work either but you can use the /separate
switch, e.g.:
%windir%\system32\runas.exe /user:admin "explorer /separate,c:\"
hth
-Stefan
--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------
.
- References:
- Prev by Date: Re: Feature is not available?
- Next by Date: Re: GUID values in VFP 6
- Previous by thread: Re: Is there a VFP command without using RUN ?
- Next by thread: Re: Is there a VFP command without using RUN ?
- Index(es):
Relevant Pages
|