Registry <-> net use, net...

  • Thread starter Thread starter Clovis
  • Start date Start date
C

Clovis

Hello,
I'm looking for the registry equivalence to the
net use..
net time..
printers..
settings. Could someone give me a link?
Thank you
 
What exactly do you mean by "registry equivalent"? What
are you trying to achieve?
 
I have several batch(cmd) file to set a specific
environment for the users. Now I'm writting a c++ program
to achieve the same thing, working directly with the
registry.(and avoid the dos prompt window)
Thanks for helping me out
 
The details for making network connections are included
in net.exe (and possibly in some .dll files), not in the
registry. If you want to make such connections under C++
then you need to spawn a process that will invoke net.exe.
However, there is no need to start a Command Prompt
(which I assume is what you mean with "DOS Prompt").
 
Perhaps you could describe in greater detail exactly what you would like to
do. As has been previously posted, there is not a way to do net.exe
functionality via the registry.

--

Thanks,
Marc Reynolds
Microsoft Technical Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
You DO can use the registry to create a network drive:
(for win2k)
in the "network" key
-new key (name of the drive)
-"ConnectionType",1
-"ProviderName","Microsoft Windows Network"
-"ProviderType",131072
-"RemotePath",\\server\map
-"UserName",""
That's all.
I was wondering if I could use the registry for more
settings (printer,time,dns..)things and where could I find
some more info.
I'm trying to stop using batch file for real c++ program.
Thank you
 
I recommend that you run the following experiment:
- Rename c:\winnt\system32\net.exe to net.ex
- Reboot your machine

You will most likely find that your "registry connection" method
now fails, because it is unable to invoke net.exe.

IMHO, using the registry for such things provides you with no
advantages other than winning a prize for obscure programming.
You simply exchange the well-known interface of net.exe with
a registry interface that few people know about. Furthermore,
you probably violate the KISS principle by unnecessarily
adding another agent (the registry) to your command chain.
 
OK I'll stick with
use net..
Actually I just wanted to change the interface and have a
nice looking program insted of using batch files.
Thanks for the comments
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top