Re: How to detect if current directory is on a CD



"ipellew@xxxxxxxxxxxxxxx" <ipellew@xxxxxxxxxxxxxxx> wrote in message <1153570985.379173.95480@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>:
Hi;

I have a DBS that that generates some javasript and allows the user to alter table contents.

If the database is being executed on a CD/DVD how can I tell is the
current directory is unwritable from within the Access VB module?

Regards
Ian

I would probably work with some of the objects, methods and properties
of the filesystemobject.

With a reference to Microsoft Scripting Runtime, you should be able to
do something like this

dim fs as scripting.filesystemobject
dim dr as scripting.drive

set fs = new scripting.filesystemobject
' or late bind, and use
' set fs = createobject("scripting.filesystemobject")
set dr = fs.getdrive(strYourDrive) ' currentproject.path

debug.print dr.drivetype

Drivetype 4, I think, is CD/DVD.

Usage of the scripting libaries, are frowned upon in these newsgroups,
I think, due to scripting being disabled by some, and I think this
http://www.mvps.org/access/api/api0003.htm is more PC ;-)

--
Roy-Vidar


.



Relevant Pages

  • Re: Pipe Delimited files with headers
    ... but if you're happy with scripting and text ... Here's a sample VBScript that shifts data from a text file into a table ... 'a table in an MDB database without opening Access ... Dim oTDef 'As DAO.TableDef ...
    (microsoft.public.access.externaldata)
  • Re: List Users Accounts That are Locked Out
    ... Microsoft MVP Scripting and ADSI ... Dim objRootDSE, strConfig, adoConnection, adoCommand, strQuery ... Dim strDN, dtmDate, objDate, strUser, strNTName ... Set objList1 = CreateObject ...
    (microsoft.public.windows.server.scripting)
  • Re: last login for only members of a group...
    ... Microsoft MVP Scripting and ADSI ... Dim objRootDSE, strConfig, objConnection, objCommand, strQuery ... Dim objRange, objRange2, objRange3, arrInt ... On Error GoTo 0 ...
    (microsoft.public.scripting.vbscript)
  • Re: How to allow user Input in script?
    ... Dim ie, doc, list, opt, btn ... Dim n, selectedValue ... Dim dicHDesk, arrPerson, strPerson, strTitle, objShell ... Microsoft MVP Scripting and WMI, ...
    (microsoft.public.windows.server.scripting)
  • Re: Script that lists all domain users with expired passwords
    ... Dim objRootDSE, strDNSDomain, strFilter, strQuery, objRecordSet ... Dim strDN, objShell, lngBiasKey, lngBias, blnPwdExpire ... Dim objDomain, objMaxPwdAge, lngHighAge, lngLowAge, intMaxPwdAge ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.windows.server.scripting)