Focus on Microsoft Technologies - Tutorials, Articles, Code Samples.

Saturday, September 02, 2006

How to Using Shell execute in, C#, VB.NET

How to Using Shell execute in u can use the follwing syntax which is an equivalent to Shell in VB

Post a Comment

Anonymous said...

Thanks for the tip.

Anonymous said...

Hi, Thanks. the same code works the same in windows application.

Emmanuel said...

My name is Emmanuel (
Does anyboby know why the following does NOT work?

Protected Sub removeDirByForceX(ByVal dirX As String, ByVal errorX As String)

' Remove a directory, after copying a dummy file in it.
' It is assumed that the calling program has ensured that dirX exists.
' The directory to be deleted is in the application folder.
' The routine is called from an ASP.NET application.

Dim dirX_FP As String = Server.MapPath(dirX)

FileCopy(aDummyFile, dirX_FP & "/000-Dummy-file.txt")
Directory.Delete(dirX_FP, True) ' delete dir and all subdirs in it
Catch ex As Exception
errorX = "ERROR: " & ex.Message.ToString
Exit Sub
End Try

errorX = ""

End Sub