0

I have looked around a bit, and I haven't found a solution that exactly fits my needs. I have a Laptop that I use for work, and for personal use at home. At work, we are operating on a Domain, and have several Network Storage locations that I use often. So i decided that I want to Map these drives. However, I do not want to get popup messages nor see that these drives are disconnected when I am at home, and there is no connection to these servers. Is there a built in way to accomplish this task in windows 7, or am I going to need to resort to a start up script. If I need a script, how can I check to see if the computer is connected to a Domain, and then map drives based on that option. If a script is required, I would prefer to use a .bat file. Another route that would be achievable is doing this through group policy if someone can direct me as to how to push certain mapped drives to specific users.

1 Answers1

0

Without more details, I believe if value of the Windows variable USERDOMAIN is equal to the value of COMPUTERNAME then your host is not in a domain

If %USERDOMAIN% <> %COMPUTERNAME% SET indomain="y"

Alternatively, you can 'hack' it by trying to do something like a DIR of a folder like WINDOWS on a computer that's part of the domain. If you get denied then you're not part of the domain.

Lizz
  • 1,442
  • 5
  • 25
  • 51