[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2010-09-14
9
Medium Priority
?
1,202 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 78

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 78

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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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
 
LVL 78

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 78

Accepted Solution

by:
Rob Williams earned 2000 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 78

Expert Comment

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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
I work for a company that primarily works with small businesses as their outsourced IT vendor. As such the majority of these customers utilize some version of Small Business Server. Due to the economics of running a small business, many of these cus…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

829 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