Cardbox Talk


CardboxForumsCardbox Talk > "databases on password protected folders"

databases on password protected folders

Does someone have a solution?
cardbox not accessing password protected folders.

Posted By Post


31-Oct-2005 11:24

I have the following problem:

Windows XP won't remember passwords (that is the real problem and i know cardbox cannot solve that)

We have databases on a network drive.
When a remote user clicks a database on a networkdrive ( via open recent)
cardbox will say that the database is unavailable.
I think this is caused if the folder hasn't been opened before so the password is not available. So cardbox doesn't get access.

Are there workarounds around this?

For example store Folder passwords in macro's or workspaces?
(It is Ok that cardbox knows the password, but i want to keep a password on the folder)

Hope somebody can help.


31-Oct-2005 12:38


Open the file by a macro.
Place in the macro the password / username

Store in the macro something like this (not tested):
run "net", "use driveletter: \\servername\folder password /user:domain\loginid"

Acces is than ok, the file can be openened.


31-Oct-2005 12:46

Looking through Google I have come across a couple of ways that this might be done programmatically through a macro.

The key is that if you map a network drive (for example, E: --> \\anothermachine\resourcename) then you are allowed to specify user names and passwords in this process, and the password is then remembered (at least, according to the documentation!) whenever you access that network drive EITHER through the drive letter OR through the resource name..... which sounds exactly what you need.

There is an object called WSHNetwork that you can create from within VBScript, and it has a method called MapNetworkDrive that lets you map the drive and specify a password. You can read a description of it at http://codeproject.com/books/1578701392.asp?df=100&forumid=2007&exp=0 or on Microsoft's own site.

The drawback is that this requires you to have a spare drive letter available and it requires your macro to know which it is (although WSHNetwork has methods that let you discover what drive letters are being mapped). As far as I know, once you have actually opened the file you should be able to unmap the drive letter again.

At the Windows command line, the NET USE command also maps network drives to drive letters, but the drive letter is in this case **optional**, so you don't need to use up a drive letter (or worry about what letters are available to be mapped). You could construct a NET USE command in your macro and use the Run method within VBScript to run that command.

This is all based on a reading of the documentation -- other people here may have practical experience of this.

Charles Welling

31-Oct-2005 14:14

To be honest, I believe the problem shouldn't exist at all. If you have a network, then there must be someone who acts as an administrator. And he or she should see to it, that shared folders are shared without the need to supply extra passwords, unless there's a very good reason to do so. You haven't told us what kind of network you use, but if you're in a network with a server you log into, then your user credentials should grant you access to the database folder.
Working around this using the solutions mentioned before is certainly not the right way to deal with this problem. They are ad hoc solutions which will make things a lot more complicated than necessary.
If you're in a peer-to-peer network without a central user administration, please consider the purchase of the Cardbox server. That will make life a lot easier.

Kind regards


31-Oct-2005 15:32

I think that you cannot understand with the availbable information the reason why people are doing what are doing.
Helping people is something different then people teaching your solutions...


1-Nov-2005 14:46

Thanks to you all.

(even the one teaching how to do it your way, i will make a study of it)

the databases are on an old windows 98SE computer that has the old fashioned/simple / unsecure (secure enough for us) stucture from shared folders.
(select the folder say you want to share it and give it a networkfoldername & password)
(AFAIK in window 98 it is not possible to share a folder without password)

Windows XP Home does seem not like this structure and doesn't remember this kind of passwords.
It has an completly other way of working with shared folders
(I think microfoft finds backwards compatability a dirty word in the relation XP-98)
(it cannot have anything to do with security, windows XP has shared folders without any passwordprotection)

Even mapping the drive in windows XP doesn't help (after restart XP does remember the mapping but forgets the password)

Macro's are maybe the only solution but I find them daunting.
(and i have no experience with it either)

All thanks for the reply.

© 2010 Cardbox Software Limited   Home