Click here to Skip to main content
15,888,968 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: deploying application. Pin
GuyThiebaut19-Sep-07 0:18
professionalGuyThiebaut19-Sep-07 0:18 
GeneralRe: deploying application. Pin
d_smit19-Sep-07 2:56
d_smit19-Sep-07 2:56 
GeneralRe: deploying application. Pin
JamesS[C1]20-Sep-07 3:20
JamesS[C1]20-Sep-07 3:20 
Questioncode to print Pin
Faruzzy18-Sep-07 20:40
Faruzzy18-Sep-07 20:40 
AnswerRe: code to print Pin
C1AllenS18-Sep-07 22:27
C1AllenS18-Sep-07 22:27 
QuestionHoverGradientButton Lybra.Forms.controls.Hovergradient Pin
Faruzzy18-Sep-07 20:37
Faruzzy18-Sep-07 20:37 
AnswerRe: HoverGradientButton Lybra.Forms.controls.Hovergradient [modified] Pin
Dave Kreskowiak19-Sep-07 2:03
mveDave Kreskowiak19-Sep-07 2:03 
QuestionSharing window folder Pin
helelark12318-Sep-07 19:36
helelark12318-Sep-07 19:36 
Hello,

I am using VS2005 (Framework 2.0)
I am trying to share a folder through network.
I found 2 different codes that work perfectly.
The only thing I need is the sharing to be readonly.

Here is the first code:
Try
' create a directory
Directory.CreateDirectory("C:\ScanUtilityFiles")
' Create a ManagementClass object
Dim managementClass As New ManagementClass("Win32_Share")
' Create ManagementBaseObjects for in and out parameters
Dim inParams As ManagementBaseObject = managementClass.GetMethodParameters("Create")
Dim outParams As ManagementBaseObject
' Set the input parameters
inParams("Description") = "My Files Share"
inParams("Name") = "My Files Share"
inParams("Path") = "C:\MyShareFolder"
inParams("Type") = 0


' Disk Drive
' Invoke the method on the ManagementClass object
outParams = managementClass.InvokeMethod("Create", inParams, Nothing)
' Check to see if the method invocation was successful
If CInt((outParams.Properties("ReturnValue").Value)) <> 0 Then
Throw New Exception("Unable to share directory.")
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try

Here is the second code:
Dim info As New ProcessStartInfo()
info.UseShellExecute = True
info.WindowStyle = ProcessWindowStyle.Hidden
info.Arguments = "/c net share ScanUtilityFiles=C:\My Share Folder"
info.FileName = "cmd"

System.Diagnostics.Process.Start(info)


Please Help


Shay Noy

AnswerRe: Sharing window folder Pin
Dave Kreskowiak19-Sep-07 2:01
mveDave Kreskowiak19-Sep-07 2:01 
GeneralRe: Sharing window folder Pin
helelark12319-Sep-07 3:15
helelark12319-Sep-07 3:15 
GeneralRe: Sharing window folder Pin
Dave Kreskowiak20-Sep-07 10:28
mveDave Kreskowiak20-Sep-07 10:28 
QuestionComboBox With PropertyGrid Control Pin
VB 8.018-Sep-07 18:00
VB 8.018-Sep-07 18:00 
AnswerRe: ComboBox With PropertyGrid Control Pin
Dave Kreskowiak19-Sep-07 1:56
mveDave Kreskowiak19-Sep-07 1:56 
GeneralRe: ComboBox With PropertyGrid Control Pin
VB 8.019-Sep-07 4:47
VB 8.019-Sep-07 4:47 
GeneralRe: ComboBox With PropertyGrid Control Pin
Dave Kreskowiak19-Sep-07 7:16
mveDave Kreskowiak19-Sep-07 7:16 
GeneralRe: ComboBox With PropertyGrid Control Pin
VB 8.020-Sep-07 2:42
VB 8.020-Sep-07 2:42 
GeneralRe: ComboBox With PropertyGrid Control Pin
Dave Kreskowiak20-Sep-07 9:44
mveDave Kreskowiak20-Sep-07 9:44 
GeneralRe: ComboBox With PropertyGrid Control Pin
VB 8.026-Sep-07 4:46
VB 8.026-Sep-07 4:46 
GeneralRe: ComboBox With PropertyGrid Control Pin
Dave Kreskowiak26-Sep-07 12:59
mveDave Kreskowiak26-Sep-07 12:59 
GeneralRe: ComboBox With PropertyGrid Control Pin
VB 8.026-Sep-07 21:09
VB 8.026-Sep-07 21:09 
GeneralRe: ComboBox With PropertyGrid Control Pin
VB 8.027-Sep-07 0:24
VB 8.027-Sep-07 0:24 
GeneralRe: ComboBox With PropertyGrid Control [modified] Pin
Dave Kreskowiak27-Sep-07 1:42
mveDave Kreskowiak27-Sep-07 1:42 
QuestionSystem.drawing.bitmap Pin
plural18-Sep-07 8:58
plural18-Sep-07 8:58 
AnswerRe: System.drawing.bitmap Pin
Guffa18-Sep-07 9:29
Guffa18-Sep-07 9:29 
QuestionAppleScript guy asks &quot;Can VB.NET --------?&quot; Pin
@largeinsd18-Sep-07 7:27
@largeinsd18-Sep-07 7:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.