By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,552 Members | 927 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,552 IT Pros & Developers. It's quick & easy.

Checking File and Print Sharing

P: n/a
Hi -

I'm creating an installation program that will install a VB.NET program and
an instance of MSDE on an unknown desktop (commercial application). The
install will include the MSDE redistributable files (and it will launch the
MSDE Setup.exe to install MSDE).

I've read that "Except on Win 98 and Millennium, file and print sharing must
be active"

How can my install program ensure this (programmatically)? More
specifically:

Where (registry setting or elsewhere) do I check for these settings, and
what name-value pairs are valid?

Is this the correct approach?

Thanks for your help.

- Jeff
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Hi Jeff,

I think there is no easy way to do it programmatically. You may try to If
you search "file and printer sharing" enable wmi in google groups, you can
find a lot of hits on this topic. From the link, we will find one tool
named Snetcfg can be used to get close to it.

I also searched in our internal database and found the following
information for you:
You can control file and printer sharing bysetting
hklm\system\currentcontrolset\services\class\vxd\v netsup FileSharing - AND
- PrinterSharing.

One must first make sure that "VREDIR" and "VNETSUP" are installed. You can
do this with IPNEW. There is a Client ID string for vredir, you will need
to create a new one for Vnetsup. Set the string value of the registry
entry to "On" to allow the specified sharing and "Off" to disable the
specified sharing option.

You can install one tool named regmon from www.sysinternals.com to monitor
registry value's change.
For how to install "file and printer sharing", please refer to one DDK
sample IPNEW on the Win98 DDK. It can be used to do that.
In fact, this question is better asked in DDK group since this function on
Win9X is implemented in DDK.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #2

P: n/a
Hi Jeff,

Thank you for the information. We will perform further research on the
issue and update you as soon as possible.

Luke

Nov 21 '05 #3

P: n/a
Hi Jeff,

My colleague directed me to this post. :)

As I mentioned before, in order to accomplish this task, we need to go
through DDK way. For the time being, it is not possible to use VB or .NET
application to develop it. There is no way to use VB to accomplish it
directly.

For a possible workaround, you may develop it in C++ as a DLL and export
some functions. In VB, you can call functions from the DLL to do that.

Hope that helps.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
-http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.as
p&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #4

P: n/a
Your response doesn't help at all, YanHong.

- Jeff
"Yan-Hong Huang[MSFT]" <yh*****@online.microsoft.com> wrote in message
news:tH**************@cpmsftngxa10.phx.gbl...
Hi Jeff,

My colleague directed me to this post. :)

As I mentioned before, in order to accomplish this task, we need to go
through DDK way. For the time being, it is not possible to use VB or .NET
application to develop it. There is no way to use VB to accomplish it
directly.

For a possible workaround, you may develop it in C++ as a DLL and export
some functions. In VB, you can call functions from the DLL to do that.

Hope that helps.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
-http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam. as p&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #5

P: n/a
Hi Jeff,

I am afraid I didn't mention it quite clearyly. In order to accomplish what
you need, the only way is DDK programming. So it can't be done in VB
programming directly.

I understand you are not familar with C++ programming. You can contact
Microsoft Product Support Service(PSS) on it if necessary.

Thanks very much for your understanding.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
-http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.as
p&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.