I have the code to create a folder, does anyone have the code to share the folder and set the permission for everyone to have full control?
Thank You
I have the code to create a folder, does anyone have the code to share the folder and set the permission for everyone to have full control?
Thank You
Code:Dim info As New ProcessStartInfo("net", "share test=d:\testshare /grant:everyone,full") With info .RedirectStandardOutput = True .UseShellExecute = False .CreateNoWindow = True End With Dim proc As Process = Process.Start(info) Me.ResultTextBox.Text = proc.StandardOutput.ReadToEnd proc.Dispose()
Some useful links: Learning videoes, Code Samples, WMI Code Creator, MSDN, The Code Project, WindowsClient.net, ASP.net, W3 Schools, Regular-Expressions.info, GDI+ FAQ
How to format posts with code blocks etc - present the problem/post properly
THank you, how can i link that to a textbox? whatever is typed into textbox1 is shared?
textbox1 = please enter in foldername
button1 = share folder
I'd use the FolderBrowserDialog (add to form from Toolbox). Doubleclick the Button in designer to get to the Click event handler and write your code there. You'd call the dialog.ShowDialog and retrieve the SelectedPath property value and use that as input to the String expression. Give it a go.
Some useful links: Learning videoes, Code Samples, WMI Code Creator, MSDN, The Code Project, WindowsClient.net, ASP.net, W3 Schools, Regular-Expressions.info, GDI+ FAQ
How to format posts with code blocks etc - present the problem/post properly
Bookmarks