For me, it is as simple as this:

DECLARE INTEGER ShellExecute IN shell32.dll ; 
  INTEGER hndWin, ; 
  STRING cAction, ; 
  STRING cFileName, ; 
  STRING cParams, ;  
  STRING cDir, ; 
  INTEGER nShowWin

cFileName = "c:\Windows\System32\Wscript.Exe" 
cAction = "open" 
cParams = "D:\$$Logon_Script\MedcinUpdateVerify.vbs"
ShellExecute(0,cAction,cFileName,cParams,"",1)

I actually compiled the above code into an executable so I could use the
'RunAs' option and run the executable under an admin context.

With a little work, the above could be converted to a simple gui to take
the cFileName parameter, or you could rip the parameter off of the
commandline.

By the way, folks, I'm getting a lot of opposition to using the fox in
my development environment these days and the latest rage is to do
everything in Sharepoint -- I need to find another job...

v/r
 

//SIGNED//

Stephen S. Wolfe, YA2, DAF
6th MDG Data Services Manager
6th MDG Information System Security Officer
Comm (813) 827-9994  DSN 651-9994

-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Ted Roche
Sent: Thursday, December 18, 2008 3:16 PM
To: [email protected]
Subject: Re: Open default browser

On Thu, Dec 18, 2008 at 2:49 PM, Tracy Pearson <[email protected]>
wrote:

>   RUN "START http://google.com";
> OR
>   LOCAL oShell as wscript.shell
> ...
> OR
>   DECLARE INTEGER ShellExecute IN Shell32.DLL ;
> ...

Aaah! Too many choices! It's worse that Linux!

I think there's also an FFC class you can invoke that wraps the
ShellExecute line and let's you do it in two lines of code...

The Joys of FoxPro!

-- 
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com


[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/9220d8a91bf48c4fba357aea501ff76903abc...@amcw3vn518.amc.ds.af.mil
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to