473,421 Members | 1,618 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,421 software developers and data experts.

Create hidden share on remote server from vb.net code behind??

Hi,

I am writing an asp.net / Active Directory application using vb.net in it's
code-behind pages. The app is running on the W2k3 (r1) domain controller
(e.g. server1). Does anyone know how to create a hidden share, from
vb.net, for an existing folder on a remote server? e.g. for a folder
\\server2\D$\foldera\folderb\123456 I want to create a share on server2
\\server2\123456$ and give user 123456 full control of that folder.

Thanks for thinking about this, if you do, and apologies if this is the
wrong group..

Arth.
Nov 19 '05 #1
2 2384
http://msdn.microsoft.com/library/de...in32_share.asp

--
Daniel Fisher(lennybacon)
http://www.lennybacon.com
"freenews.netfront.net" <a@a.a> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi,

I am writing an asp.net / Active Directory application using vb.net in
it's code-behind pages. The app is running on the W2k3 (r1) domain
controller (e.g. server1). Does anyone know how to create a hidden
share, from vb.net, for an existing folder on a remote server? e.g. for a
folder \\server2\D$\foldera\folderb\123456 I want to create a share on
server2 \\server2\123456$ and give user 123456 full control of that
folder.

Thanks for thinking about this, if you do, and apologies if this is the
wrong group..

Arth.

Nov 19 '05 #2
Const FILE_SHARE = 0
Const MAXIMUM_CONNECTIONS = 25
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set objNewShare = objWMIService.Get("Win32_Share")
errReturn = objNewShare.Create _
("C:\Finance", "FinanceShare", FILE_SHARE, _
MAXIMUM_CONNECTIONS, "Public share for the Finance group.")

--
Daniel Fisher(lennybacon)
http://www.lennybacon.com
"freenews.netfront.net" <a@a.a> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi,

I am writing an asp.net / Active Directory application using vb.net in
it's code-behind pages. The app is running on the W2k3 (r1) domain
controller (e.g. server1). Does anyone know how to create a hidden
share, from vb.net, for an existing folder on a remote server? e.g. for a
folder \\server2\D$\foldera\folderb\123456 I want to create a share on
server2 \\server2\123456$ and give user 123456 full control of that
folder.

Thanks for thinking about this, if you do, and apologies if this is the
wrong group..

Arth.

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dave | last post by:
I have an application where I am providing the user the ability to select or create a folder on a domain, using SHBrowseForFolder. When the user selects/creates a folder on a remote computer, it...
2
by: Guadala Harry | last post by:
In an aspx file I have declared a hidden field like this: <input id="hTestVal" type=hidden value="-1" runat="server"> Defined in the code-behind like this: protected...
4
by: Magnus Blomberg | last post by:
Hello! I have a problem when using a hidden field to send a value to the server. Below you can see my code in simplyfied versions. What I'm trying to do is: 1. The user browses for a picture...
14
by: Paul | last post by:
I want to set the page title and/or a form hidden field programatically through ASP.Net. I do not want to use something like... <% sTitle ="My Title" %> <html><title><%=sTitle%></title>..... ...
11
by: Andre | last post by:
Hi, I have ASP.NET application running on standalone (not part of the domain) Windows 2003. I use forms authentication for my application. The problem I have is that I need to create and read...
2
by: Glen Conway | last post by:
Hi, I am trying to get the contents of a file in a hidden share on a remote server, something like '\\server.domain.com\c$\program files\application\document.xml'. When I try any of the...
2
by: yxq | last post by:
Hello I want to create and delete the folder share, i found that it is ok for generic folder, but it does not work for Root directory(i.e c:\, d:\) The code...
2
by: freenews.netfront.net | last post by:
Hi, I am writing an asp.net / Active Directory application using vb.net in it's code-behind pages. The app is running on the W2k3 (r1) domain controller (e.g. server1). Does anyone know how...
6
by: JonSteng | last post by:
..Net Visual Studio Professional 2003 Version 7.1.3088 ..Net Framework 1.1 SP1 Version 1.1.4322 IIS 5.1 Windows XP Professional SP2 Micron T3000 Laptop (1.5 GHz; 1GB RAM; 40GB HD with 17GB Free)...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.