Assign mapped drive, copy files, for all new users 
Author Message
 Assign mapped drive, copy files, for all new users

This is a newbie question...

I just recently setup a Win2k domain, finally got DNS set-up...everything is
going great. I'd like to minimize some of my admin when I create a new user
on the domain.

Is there a way to creat mapped drive copy a couple directories from a
network share and copy a shortcut to a the new users desktop?

Is this done with WSH?

Also, I haven't been very successful finding info on WSH...is there a
preferred editor/IDE or do I jus use notepad?

Thanks
Dennis



Mon, 03 May 2004 01:17:00 GMT  
 Assign mapped drive, copy files, for all new users

You should take a look at the thread *right* above this one: "WSH/VBS in not
easy for me"

I think it also would be helpful for you to take a look at this article, there
is a lot of information there for network admins:



Subject: Re: User creation, login script and SW installation (Was: What is
windowsscript.adm and where can I get it?)
Newsgroups: microsoft.public.scripting.wsh
Date: 2001-11-10 22:10:10 PST

You can use http://groups.google.com/advanced_group_search to fetch it:

tip:
You can use http://groups.google.com/advanced_group_search to search in a news
database having articles dated back to all the way to 1995.

Fill in *scripting in the Newsgroup field to narrow down the search to the
scripting groups only.

If you haven't done it already, download and install the "local" WSH
documentation.

WSH 5.6 documentation download:
http://msdn.microsoft.com/downloads/sample.asp?url=/MSDN-FILES/027/00...

To map a drive:

Set WshNetwork = CreateObject("WScript.Network")
on error resume next
WshNetwork.MapNetworkDrive "Z:", "\\computer\share"
on error goto 0

To copy folders:
Use the CopyFolder Method

You should't copy shortcuts if you can avoid it, it is better to create them on
the fly using the CreateShortcut Method :

set oWshShell = WScript.CreateObject("WScript.Shell")
sDesktop = oWshShell.SpecialFolders("Desktop")

set oSLink = WshShell.CreateShortcut(sDesktop & "\Read Me.lnk")
oSLink.TargetPath = "notepad.exe"
oSLink.Arguments = "z:\readme.tst"       ' optional
oSLink.IconLocation = "notepad.exe, 0"   ' optional
oSLink.WorkingDirectory = "z:"           ' optional
oSLink.Save

--
torgeir

Quote:

> This is a newbie question...

> I just recently setup a Win2k domain, finally got DNS set-up...everything is
> going great. I'd like to minimize some of my admin when I create a new user
> on the domain.

> Is there a way to creat mapped drive copy a couple directories from a
> network share and copy a shortcut to a the new users desktop?

> Is this done with WSH?

> Also, I haven't been very successful finding info on WSH...is there a
> preferred editor/IDE or do I jus use notepad?

> Thanks
> Dennis



Mon, 03 May 2004 05:03:27 GMT  
 Assign mapped drive, copy files, for all new users
Thanks Torgeir, is there a way to check and see if the user/computer already
has those "objects"?  In other words if the drive is already mapped, it
prompts the user...I really don't want to confuse people around here they do
that enough with out my help!

Regards
Dennis


Quote:

> You should take a look at the thread *right* above this one: "WSH/VBS in
not
> easy for me"

> I think it also would be helpful for you to take a look at this article,
there
> is a lot of information there for network admins:



> Subject: Re: User creation, login script and SW installation (Was: What is
> windowsscript.adm and where can I get it?)
> Newsgroups: microsoft.public.scripting.wsh
> Date: 2001-11-10 22:10:10 PST

> You can use http://groups.google.com/advanced_group_search to fetch it:

> tip:
> You can use http://groups.google.com/advanced_group_search to search in a
news
> database having articles dated back to all the way to 1995.

> Fill in *scripting in the Newsgroup field to narrow down the search to the
> scripting groups only.

> If you haven't done it already, download and install the "local" WSH
> documentation.

> WSH 5.6 documentation download:

http://msdn.microsoft.com/downloads/sample.asp?url=/MSDN-FILES/027/00...
sdncompositedoc.xml

- Show quoted text -

Quote:

> To map a drive:

> Set WshNetwork = CreateObject("WScript.Network")
> on error resume next
> WshNetwork.MapNetworkDrive "Z:", "\\computer\share"
> on error goto 0

> To copy folders:
> Use the CopyFolder Method

> You should't copy shortcuts if you can avoid it, it is better to create
them on
> the fly using the CreateShortcut Method :

> set oWshShell = WScript.CreateObject("WScript.Shell")
> sDesktop = oWshShell.SpecialFolders("Desktop")

> set oSLink = WshShell.CreateShortcut(sDesktop & "\Read Me.lnk")
> oSLink.TargetPath = "notepad.exe"
> oSLink.Arguments = "z:\readme.tst"       ' optional
> oSLink.IconLocation = "notepad.exe, 0"   ' optional
> oSLink.WorkingDirectory = "z:"           ' optional
> oSLink.Save

> --
> torgeir


> > This is a newbie question...

> > I just recently setup a Win2k domain, finally got DNS

set-up...everything is

- Show quoted text -

Quote:
> > going great. I'd like to minimize some of my admin when I create a new
user
> > on the domain.

> > Is there a way to creat mapped drive copy a couple directories from a
> > network share and copy a shortcut to a the new users desktop?

> > Is this done with WSH?

> > Also, I haven't been very successful finding info on WSH...is there a
> > preferred editor/IDE or do I jus use notepad?

> > Thanks
> > Dennis



Wed, 05 May 2004 02:18:11 GMT  
 Assign mapped drive, copy files, for all new users
Hi

Yes, use the DriveExists Method. Or if you want to check exactly what the
driveletter is mapped to, you can use the DriveLetter Property I think (or the
EnumNetworkDrives Method).

--
torgeir

Quote:

> Thanks Torgeir, is there a way to check and see if the user/computer already
> has those "objects"?  In other words if the drive is already mapped, it
> prompts the user...I really don't want to confuse people around here they do
> that enough with out my help!

> Regards
> Dennis



> > You should take a look at the thread *right* above this one: "WSH/VBS in
> not
> > easy for me"

> > I think it also would be helpful for you to take a look at this article,
> there
> > is a lot of information there for network admins:



> > Subject: Re: User creation, login script and SW installation (Was: What is
> > windowsscript.adm and where can I get it?)
> > Newsgroups: microsoft.public.scripting.wsh
> > Date: 2001-11-10 22:10:10 PST

> > You can use http://groups.google.com/advanced_group_search to fetch it:

> > tip:
> > You can use http://groups.google.com/advanced_group_search to search in a
> news
> > database having articles dated back to all the way to 1995.

> > Fill in *scripting in the Newsgroup field to narrow down the search to the
> > scripting groups only.

> > If you haven't done it already, download and install the "local" WSH
> > documentation.

> > WSH 5.6 documentation download:

> http://msdn.microsoft.com/downloads/sample.asp?url=/MSDN-FILES/027/00...
> sdncompositedoc.xml

> > To map a drive:

> > Set WshNetwork = CreateObject("WScript.Network")
> > on error resume next
> > WshNetwork.MapNetworkDrive "Z:", "\\computer\share"
> > on error goto 0

> > To copy folders:
> > Use the CopyFolder Method

> > You should't copy shortcuts if you can avoid it, it is better to create
> them on
> > the fly using the CreateShortcut Method :

> > set oWshShell = WScript.CreateObject("WScript.Shell")
> > sDesktop = oWshShell.SpecialFolders("Desktop")

> > set oSLink = WshShell.CreateShortcut(sDesktop & "\Read Me.lnk")
> > oSLink.TargetPath = "notepad.exe"
> > oSLink.Arguments = "z:\readme.tst"       ' optional
> > oSLink.IconLocation = "notepad.exe, 0"   ' optional
> > oSLink.WorkingDirectory = "z:"           ' optional
> > oSLink.Save

> > --
> > torgeir


> > > This is a newbie question...

> > > I just recently setup a Win2k domain, finally got DNS
> set-up...everything is
> > > going great. I'd like to minimize some of my admin when I create a new
> user
> > > on the domain.

> > > Is there a way to creat mapped drive copy a couple directories from a
> > > network share and copy a shortcut to a the new users desktop?

> > > Is this done with WSH?

> > > Also, I haven't been very successful finding info on WSH...is there a
> > > preferred editor/IDE or do I jus use notepad?

> > > Thanks
> > > Dennis



Wed, 05 May 2004 02:41:59 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. copy files from network path without mapping the drive

2. Adding new VPN users and assigning static IP addresses via VBS

3. Creating a new user and assigning a password.

4. Mapping Net Drives with User Permission

5. A logon script that maps drives according to the users group memberships

6. WSH Map drive as different user?

7. Newbie - Mapping drives according to user and change default folders

8. multiple mapped drives & user properties

9. map NW-drive with user and PW

10. Mapping drive to user's home directory

11. Mapping drive based off of OU and user name

12. enumNetworkDrives in a Novell environment not returning user mapped drives

 

 
Powered by phpBB® Forum Software