-
WSdrcmg
AskWoody LoungerI would love to know what it would take for my BAT file to run from the Startup menu :shrug:
I assume that you have created a shortcut to the BAT file in your startup folder, where is the BAT file itself?
The bat is located in c:usersgeorge and is named dshare.bat. Like you said I created a shortcut in the startup folder. I just opened notepad typed in: NET SHARE J=J: /GRANT:everyone,FULL hit Enter and saved it. To test I went to sharing on the J drive and unchecked Share this folder in Advanced Sharing. I then tested from one of the other computers and found that I could not access the drive. I then went to the Command prompt and ran the bat. I went back to sharing and found Share this folder was checked. I accessed the drive from the other computers with no difficulty. I then restarted the computer. After I logged in I saw the Command prompt window flash by. I then checked and the Share this folder box was checked and the other computers could access the drive.
BTW: I am Administrator on the computer.
-
WSdrcmg
AskWoody LoungerI have a VERY similar BAT file that shares a drive that is not available at boot time. My BAT file seems to trip up the Windows 7 UAC stuff and it just won’t run from the Startup folder.
Have you done anything to disable UAC?
UAC is on and set at the default level. I haven’t made many changes at all to anything. I wonder if it is because this is a USB drive? The batch file runs after I log in. It ran for me from the Command prompt with no trouble either. I don’t know if it makes a difference, but I am running Home Premium.
-
WSdrcmg
AskWoody LoungerI suspect that Windows is looking at your shares before the external drive is initialized, and since it the drive is not yet available, the shares are disconnected. Quick fix would be to write a small script or batch and put it in the startup. Take a look at the NET command. A batch with a line something like
NET SHARE MySharedPhotos=G:Photos /GRANT:everyone,FULL
Would recreate the share every boot, as long as your external drive is on and assigned the same drive letter each time (ie: if you boot with a flash drive in, Windows may assign the flash G and the external H)
Anyhow, just a thought. Post back if you need more help,
Cheers,
NH
Thanks for the info. I haven’t written any batch files since the DOS days and am not sure exactly how to word this one. The drive is assigned drive letter J: and that is the one that shows up each time. I want the whole drive shared. It is mapped as J: on the other computers as well.
I spent some time looking at NET and wrote a batch file. I tried it and it worked. I then added it to Startup. I just rebooted the system and the drive is shared. I saw the batch file pop up the Command prompt and execute, so I suspected it would work. This solves a major problem for me. Thanks.
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
VLC Introduces Cutting-Edge AI Subtitling and Translation Capabilities
by
Alex5723
7 minutes ago -
Powershell version?
by
CWBillow
14 minutes ago -
SendTom Toys
by
CWBillow
1 hour, 11 minutes ago -
Add shortcut to taskbar?
by
CWBillow
2 hours, 16 minutes ago -
Sycophancy in GPT-4o: What happened
by
Alex5723
11 hours, 5 minutes ago -
How can I install Skype on Windows 7?
by
Help
9 hours, 48 minutes ago -
Logitech MK850 Keyboard issues
by
Rush2112
4 hours, 33 minutes ago -
We live in a simulation
by
Alex5723
1 day, 1 hour ago -
Netplwiz not working
by
RetiredGeek
11 hours, 48 minutes ago -
Windows 11 24H2 is broadly available
by
Alex5723
1 day, 13 hours ago -
Microsoft is killing Authenticator
by
Alex5723
1 hour, 16 minutes ago -
Downloads folder location
by
CWBillow
1 day, 20 hours ago -
Remove a User from Login screen
by
CWBillow
15 hours, 43 minutes ago -
TikTok fined €530 million for sending European user data to China
by
Nibbled To Death By Ducks
1 day, 11 hours ago -
Microsoft Speech Recognition Service Error Code 1002
by
stanhutchings
1 day, 11 hours ago -
Is it a bug or is it expected?
by
Susan Bradley
1 day, 15 hours ago -
Image for Windows TBwinRE image not enough space on target location
by
bobolink
1 day, 10 hours ago -
Start menu jump lists for some apps might not work as expected on Windows 10
by
Susan Bradley
9 hours, 51 minutes ago -
Malicious Go Modules disk-wiping malware
by
Alex5723
2 days ago -
Multiple Partitions?
by
CWBillow
2 days ago -
World Passkey Day 2025
by
Alex5723
56 minutes ago -
Add serial device in Windows 11
by
Theodore Dawson
3 days, 9 hours ago -
Windows 11 users reportedly losing data due forced BitLocker encryption
by
Alex5723
1 day, 10 hours ago -
Cached credentials is not a new bug
by
Susan Bradley
3 days, 13 hours ago -
Win11 24H4 Slow!
by
Bob Bible
3 days, 14 hours ago -
Microsoft hiking XBox prices starting today due to Trump’s tariffs
by
Alex5723
3 days, 11 hours ago -
Asus adds “movement sensor” to their Graphics cards
by
n0ads
3 days, 16 hours ago -
‘Minority Report’ coming to NYC
by
Alex5723
3 days, 12 hours ago -
Apple notifies new victims of spyware attacks across the world
by
Alex5723
4 days ago -
Tracking content block list GONE in Firefox 138
by
Bob99
4 days ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.