• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5. Network and Printer Objects > Managing Drive Mappings

Managing Drive Mappings

One of the most common network functions needed in scripts is the mapping of drive letters to shared network folders. Usually, drive mappings are made by a user using Explorer or the command-line command net use. Mappings made in one logon session are usually recorded in the user's profile and are made available again the next time the user logs on. However, there are times when you may want to take more direct control of mappings, such as the following:

  • In a logon script, you may wish to set up standard drive mappings that your users always need. The script should override changes made by the user in a previous logon session so that the correct mappings are guaranteed to be available.

  • In utility, backup, and maintenance scripts, you may wish to create temporary drive mappings so that files may be moved to another network location.

  • In a script that is run automatically by the Task Scheduler, you may want to use mapped drive letters. However, by default, the Task Scheduler runs scripts in the context of a special system user account and not your own user account. Therefore, your own personal standard drive mappings are not available. The script will need to create any drive mappings it needs to use.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint