Solved

How to Prevent SBS_LOGIN_SCRIPT.bat from Running on Domain Controller (SBS 2003)

Posted on 2010-09-14
9
1,182 Views
Last Modified: 2012-05-10
How do I Prevent SBS_LOGIN_SCRIPT.bat from Running on Domain Controller (SBS 2003)?

Here's the thing. There are a couple of  mapped drives, P and Q (to \\myserver\blabla) that are accessible through their letters, but they don't appear on file explorer (or in DOS). The files do appear if I search by name, however I can't right click on them (I wanted to outsmart windows by Opening Containing Folder...)

The problem that this is creating is that I can't select those folders or anything in them in when selecting files for the backup set for our backup software, therefore... those files aren't being automatically backed up.

To be honest, I saw this http://www.experts-exchange.com/OS/Miscellaneous/Q_22914795.html and didn't understand a thing. Just seeing VB script makes me tremble. I'm not a techie.

I tried unmapping the drives to the network paths, but it doesn't help - and if I logoff/login the script that maps them runs again.

Can I do something like IF 'this computer name is not such and such' THEN map the drive (but else don't) ?

Thanks!
0
Comment
Question by:drotkopf
  • 5
  • 4
9 Comments
 
LVL 77

Expert Comment

by:Rob Williams
ID: 33678772
If you are using one general batch file logon script (default with SBS) you can just add something like:

If "%ComputerName%" == "SBSname" Go To SKIPTO
rem lines you do not want to process on the SBS
net use X: \\Server\Share
:SKIPTO
rem rest of lines to be applied to all systems

[note %computername% is a variable do not change this, just change SBSname to your SBS name]

If drives are already mapped on the SBS you may have to disconnect them or run from a command line
net use * /persistent:no

This can all be controlled in group policy as well, but just adding the two lines to the batch file is simple.
0
 

Author Comment

by:drotkopf
ID: 33678851
RobWill - I had done something like that while waiting for the answer:

if not %computername% == CS01 NET USE P: \\cs01\Public_Directories

The script works great... but it didn't solve the underlying problem of not being able to navigate to the C:\Public_Directories folder using DOS or file explorer :-(

Ideas?
0
 
LVL 77

Expert Comment

by:Rob Williams
ID: 33681960
I appologize but I am not sure I understand fully.
Are you saying you cannot access using the UNC name \\server\share from a command line?
Or you cannot access using the mapped drive to the same folder?

You would be best to eliminate any drive mappings and recreate them on the server, for example

If Not "%computername%" == "CS01"  GoTo NEXT
Rem delete all existing mapped drive connections and recreate at each logon
Net Use  /persistent:no
Net Use  *  /delete
Net Use P: "\\cs01\Public_Directories"
:NEXT
 
0
 

Author Comment

by:drotkopf
ID: 33687953
RobWill-

Let's say that
- server name is S1
- folder is C:\F2 which is shared as N3
- I map Q: to \\S1\N3

a) I AM able to access using UNC name \\S1\N3 from a command line from all over the network and from the same server (DC) itself.

b) I AM also able to access it using the mapped drive (Q:), both from a command line or with Explorer navigation.

c) I AM NOT able, though, to access that folder C:\F2, not using explorer (I expand My Computer, I see C:, I expand C: and F2 does not appear!) and not through command line (C:, CD \, dir, it doesn't appear)

Thanks!
0
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 
LVL 77

Expert Comment

by:Rob Williams
ID: 33688244
That sounds more like the 'hidden' attribute of that folder is enabled.
Try opening a command line and enter  C:
then enter   attrib F2
It should return  C:\F2
But if it returns     H   C:\F2  it is hidden.
To correct or make sure  run   attrib  C:\F2  -H

You can also do using the general tab of the folder properties, but I find the attrib command more dependable
0
 

Author Comment

by:drotkopf
ID: 33693709
The attributes that is comes back with are:
    SHR

When I run attrib C:\F2 -H it comes back with
    Not resetting system file - C:\F2

That makes me think that the S is telling me that the F2 folder is a system file.

Now, we are talking about users files in there like quickbooks files, word, excel, PDFs, etc.

So i have 2 questions:
1) Should I run attrib C:\F2 -S and what are the consequences of that?
2) Why if I have show hidden files and folders selected for these (and all other) folders, it still doesn't show them?

Thanks!
0
 
LVL 77

Accepted Solution

by:
Rob Williams earned 500 total points
ID: 33693807
SHR would indicate System File, Hidden, Read only.

I would run          attrib  C:\F2  -S  -H  -R       and remove all of those attributes. No harm at all in doing so unless they are something like windows system files. Even that is only a risk if someone were to delete them.
Sow hidden files won't help because they are tagged as system files. Enabling viewing of system files and hidden files should do it.
0
 

Author Closing Comment

by:drotkopf
ID: 33694167
Thanks
0
 
LVL 77

Expert Comment

by:Rob Williams
ID: 33694196
Thanks drotkopf. Glad to hear you were able to resolve.
Cheers!
--Rob
0

Featured Post

New! My Passport Wireless Pro Wi-Fi Mobile Storage

Portable wireless storage to offload, edit, and stream anywhere.

High-capacity, wireless mobile storage designed to accompany professional photographers and videographers in the field to easily offload, edit and stream captured photos and high-definition videos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've often see, or have been asked, the question about the difference between the Exchange 2010 SP1 version, available as part of Small Business Server (SBS) 2011, and the “normal” Exchange 2010 SP1 Standard. The answer to the question is relativ…
I’m often asked about newer and larger USB drives connected to SBS2008 and 2011 failing Windows Server Backup vs the older USB drives not failing. As disk space continues to grow and drive technology change SBS2008 and some SBS2011 end up with the f…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now