Hi.
Following code works fine on XP, but not on W2K+SP4. When I run it on W2K,
it does not give me any error, exception. I have tried setting
StartInfo.ErrorDialog = True, ErrorDialogParentHandle, CreateNoWindow =
False, but in vain...
The xcopy is available in the path set in system environment variable of W2k
box...
Dim objProcess As New Process
Try
Me.Cursor = Cursors.WaitCursor
objProcess.StartInfo.FileName = "xcopy.exe"
objProcess.StartInfo.Arguments = QUOTE & TEMPLATEFOLDER &
QUOTE & " " & QUOTE & m_strQuotePath & QUOTE & " /e /c /q /g /h /r /y /i"
objProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
objProcess.StartInfo.CreateNoWindow = False
objProcess.StartInfo.ErrorDialog = True
objProcess.StartInfo.ErrorDialogParentHandle = Me.Handle
objProcess.Start()
objProcess.WaitForExit()
blnPhysicalFolderCreated = True
'2. Create an entry in the database for the new quote
objBO.CreateQuote(m_strQuote, Environment.UserName,
txtJob.Text.Trim)
Catch ex As Exception
If (blnPhysicalFolderCreated) Then 'Exception occured,
remove the folder from network drive
Directory.Delete(m_strQuotePath, True)
End If
MsgBox("exception:" & ex.StackTrace)
Throw ex
Finally
objProcess.Close()
Me.Cursor = Cursors.Default
End Try
Any ideas are greatly appreciated.
TIA
Sriram.
rsriram22 at hotmail