Solved

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

Posted on 2010-09-14
9
1,180 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

A lot of problems and solutions are available on the net for the error message "Source server does not meet minimum requirements for migration" while performing a migration from Small Business Server 2003 to SBS 2008. This error pops up just before …
Because virtualization becomes more and more common, and, with Microsoft Hyper-V included in Windows Server at no additional costs, and, most server hardware nowadays is more than capable of running a physical Small Business Server (SBS) 2008 or 201…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

708 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

13 Experts available now in Live!

Get 1:1 Help Now