How to Map your Centerbase Database as a Mapped Drive in Windows Explorer
Centerbase offers a feature to allow users at your firm to set up a mapped drive in Windows that connects and displays documents/folders from your Centerbase database within your Windows Explorer. This unlocks powerful features such as:
- Open documents from Centerbase from any Windows application using File > Open.
- Save directly back to Centerbase from Windows Applications.
- Use shortcuts in your apps to open/pin files from Centerbase.
- Create new folders in your Centerbase folders using normal Windows commands.
- Move, Copy, and Cut documents.
- Nearly all Windows drive features are available with a Centerbase mapped drive.
Mac users should use ODrive to accomplish similar capabilities for your Mac OS.
This KB will step you through setting this feature up for your Windows drive. There are many IT technicalities that must be followed precisely to accomplish a successful drive mapping.
NOTE: Implementing this is not a service Centerbase provides. Experienced Windows users should be able to accomplish this using the instructions provided here. You may email support with questions regarding this procedure, however. You should also consider the security implications of this method, as it does require storing your password locally in a windows batch file. |
Create a batch file that maps the Centerbase drive whenever the user logs into the PC.
We will go through, step by step, to show you how to create a batch file that will need to run each time you log onto your computer. Follow the steps below to set this up:
Step 1
Create a new text file (.txt) and paste the following into it. You can also use the attached .txt file at the bottom of the article as an example:
del C:\Windows\ServiceProfiles\LocalService\AppData\Local\Temp\TfsStore\Tfs_DAV\*.* /q
net use I: /delete /y
net use I: https://CBDB.centerbase.com/filesystem USERPASSWORD /user:"USERNAME" /persistent:no
Copy the text exactly as shown above. You will need to follow the steps below to understand what the script is doing and, in some places, replace the text with your Centerbase information.
- The first line clears your local Windows WebDAV cache. This is the temporary folder used to store files while uploading back to Centerbase. The issue is that this folder needs to be cleared manually as Windows never deletes these files. This could cause issues with the folder growing too large and potentially opening an older, cached version of the file from this local directory when you actually need the latest copy from Centerbase.
Important: Make sure you can browse to the local folder "C:\Windows\ServiceProfiles\LocalService\AppData\Local\Temp\TfsStore\Tfs_DAV\" in your Windows Explorer. If not, the first line of this mapping script will not work, and you may have cached file issues. If you cannot open this folder, you will need to modify its permissions to gain access from your user login. |
- The next line "net use I: /delete /y" will un-map the drive each time so that we can immediately reconnect to it again. This will eliminate errors caused by possibly having mapped the drive as a persistent drive, or at some point filling in a prompt for username and password for the drive that would cause the drive to fail on reboot. This will execute every time you run the script.
- Add your information: For the lines "net use I:" substitute whatever drive letter you want to use for the mapped drive instead of “I”. For example, if you want to map Centerbase to your G drive, change “I” to “G”. Note that you must replace this letter on both lines that say "net use I:".
- On the next line, enter your Centerbase URL in the exact format shown. Substitute your firm’s URL where you see "CBDB.centerbase.com".
- Enter your Centerbase password and do NOT put it in quotes. If your password has a percent sign (%) in it, you will need to put that % in twice. For example, if your password was “My%Password”, the password you enter in the batch file would need to be “My%%Password”. Spacing must match the example above exactly.
NOTE: NOTE: If you desire a higher level of security and do not wish to store your password on your local system in a batch file for security reasons, you should discuss with your IT Professional the possibility of mapping the Centerbase drive using Active Directory drive mapping Group Policy. The method we suggest here is simple and effective, but does store your password locally and also requires you to update your password in the batch file when you change your Centerbase password! |
- Place your username that you use to login to Centerbase where USERNAME is shown. Leave your username in quotes.
- The persistent:no portion is very important so that Windows does not attempt to save your Centerbase drive and password each time for future mapping. One of the main issues mapping these types of drives is that Windows is unable to save passwords for WebDAV drives. Spacing must match the example above exactly.
So for example the string would look as follows for the following site:
site URL: myfirm.centerbase.com
user: Jack Sprat
PW: EatnoFat
Drive to map: G
del C:\Windows\ServiceProfiles\LocalService\AppData\Local\Temp\TfsStore\Tfs_DAV\*.* /q
net use G: /delete /y
net use G: https://myfirm.centerbase.com/filesystem EatnoFat /user:"Jack Sprat" /persistent:no
Make sure you get all the spaces exactly as above. Therefore, it’s best to copy the example above and substitute your exact text as needed or use the .txt file attached.
Rename and Save the File
Save the file to your desktop and then rename it to 'cbstartup.bat' and place it anywhere on your hard drive in a location where it won't accidentally get deleted. Make sure the file name is similar as above, and not saved as a .txt file.
NOTE: Never map the drive using the Windows 'Map Network Drive' dialog. This will cause ongoing disconnection issues. The only supported method is using this batch script or using an Active Directory drive mapping Group Policy. |
Step 2
The next step is to create a shortcut to this batch file and place it into the Windows startup folder for the current user. From wherever you created the file, right-click on it, and choose 'Create Shortcut'.
This creates a shortcut file.
Next, copy this new shortcut file into the Windows startup directory for the current user. In Windows 10, this location is shown below. You can either paste the link below directly into Windows Explorer or browse to the location (requires enabling viewing of hidden files). Substitute your current username for [Username].
C:\Users\[Username]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
Another option to navigate to this startup folder is to open the Run dialog and type shell:startup. This will open the Windows startup folder.
Lastly, once in the startup folder, PASTE the shortcut link you copied earlier.
Simply restart your computer and your Centerbase drive should now map each time you log into your computer!
Step 3
Follow the link in the box below to make additional changes to your computer settings to allow you to open and save files properly. Your drive will work without these changes on smaller files but will error out on any files bigger than 50 MB.
NEXT: Edit your Registry to allow upload and download of larger files You will need to modify your Windows registry settings to allow uploading or downloading files larger than 50 MBs! |
Comments
0 comments
Please sign in to leave a comment.