The following code (borrowed from David Frankenbach and modified) will map a drive, but it pulls up a dos window momentarily. Is there anyway to stop this or minimize the window while it is executing?
declare long ShellExecute in "shell32.dll" long hwnd, string lpszOp, ;
string lpszFile, string lpszParams, ;
string lpszDir, long nShowCmd
declare long GetDesktopWindow in "win32api"
local hDCScreen
hDCScreen = GetDesktopWindow()
mcommand=" use * \\myserver\c$"
ShellExecute(hDCScreen, "open", "c:\winnt\system32\net.exe", mcommand, "c:\", 1 )
John Harvey
Shelbynet.com
"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright