Writing Registry Key

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I know this is an odd request. I have the front end that I place up on our
web site for my employees to download when I make updates. I have strict
instructions to make sure they download and replace the existing database in
a specific directory. Inevitably, they save it somewhere else and then call
me to say the updates weren't there.

I'd like to add some code that will change the following registry key so
that the file automatically saves to the directory I want:

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer]
@=""
"Download Directory"="C:\\windows\\access"

Any suggestions on a simple way to do that? My code now is a hyperlink to
the file which also closes the database so that they can save the new one and
replace. I'd just like to insert something that defaults the directory to
where I want.

Thanks
 
Mike:

If you just want to save and retrieve a registry entry you can use the
SaveSetting and GetSetting VBA functions. If you want to save registry
settings to a specific registry key, you can use the Windows API as outlined
in the following KB article:

http://support.microsoft.com/default.aspx?scid=kb;en-us;145679

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


I know this is an odd request. I have the front end that I place up on our
web site for my employees to download when I make updates. I have strict
instructions to make sure they download and replace the existing database in
a specific directory. Inevitably, they save it somewhere else and then call
me to say the updates weren't there.

I'd like to add some code that will change the following registry key so
that the file automatically saves to the directory I want:

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer]
@=""
"Download Directory"="C:\\windows\\access"

Any suggestions on a simple way to do that? My code now is a hyperlink to
the file which also closes the database so that they can save the new one
and
replace. I'd just like to insert something that defaults the directory to
where I want.

Thanks
 
I have the front end that I place up on our
web site for my employees to download when I make updates. I have
strict instructions to make sure they download and replace the
existing database in a specific directory.

Would it not be worth your while to write a vbs script that fetches the
file and puts it where you want and take the user out of the loop
altogether?

Tim F
 
Back
Top