Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Sharing folders with homegroup, using a batch file?

30 Oct 2009   #1

Windows 7 Professional
Sharing folders with homegroup, using a batch file?


Due to some drives being portable, windows unshares them all the time on reboot, so I'm wondering if there is a command line option (batch command) to share folders with a homegroup.

I already did some checking, and found that when you share a folder, it starts the process "C:\Windows\system32\svchost.exe -k netsvcs" which writes to the register in "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanServer\Shares"

I tried to export the keys, unshare the folder manually, and when re-setting the keys, but that did not work...

Anyone has an idea of how I can do this?


My System SpecsSystem Spec
31 Oct 2009   #2

7600.20510 x86

No ideas, but you can use a batch file containing net use command for classic mapping.

net use /? at command prompt for help.
My System SpecsSystem Spec

 Sharing folders with homegroup, using a batch file?

Thread Tools

Similar help and support threads
Thread Forum
Batch File .bat to copy file from File Sharing & FTP Hosting
Hi all, Any idea how to write Batch File .bat to copy file from File Sharing & FTP Hosting to local directory. Current the File Sharing & FTP Hosting is SMARTFILE. I don't want to use WINSCP as the connector. Thanks
General Discussion
Sharing a single batch file for all home group Computers..
Hello, Here is my question. I have several computers on a home group. All the computer have program X on them. I need to run a batch file to start the program with some arguments that need to be changed often. I would like to have the computers all run the same batch file from shared location to...
Network & Sharing
File Sharing and Homegroup Sharing Problem
Hi, I have been going crazy trying to get my PC to share files with a couple of laptops. I am running Windows 7 64 Bit and the laptops are running Windows 7 64 bit and Windows XP. I have enabled file sharing but The Windows 7 Laptop keeps giving me an unknown error when trying to join a...
Network & Sharing
Homegroup File Sharing
Having difficulty with a homegroup and file sharing: one desktop PC with the family's main documents (which are on a separate drive to the system) and two laptops which need to access those documents. I've got them all seeing each other, and they can see the folders in the drive, but when I try to...
Network & Sharing
Cannot Access All Folders When Sharing In Homegroup
Hello, I have two PC's running Windows 7 x64 (setup for Home network) and I am trying to share all the contents of the HDD's. I can access and delete files in most of the folders (not just the Public folder) but I cannot access the sub-folders under the "User" folder, I keep getting Access...
Network & Sharing

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 02:11.
Twitter Facebook