Re: AW: How to detect a CD Drive / write permissions?
Hi Tiemo, Hi Ken, Mac and Win. Obviously there is no native Rev function, do you have snippets how to ask the shell for it? Please take a look at this thread in the Windows section of the Rev- forum: http://forums.runrev.com/phpBB2/viewtopic.php?t=2357 There you wil find some vbscript snippets that you can adapt and then do xxx as vbscript. Hope that helps. Thank you Tiemo Best Klaus Major [EMAIL PROTECTED] http://www.major-k.de ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: AW: How to detect a CD Drive / write permissions?
On MacOSX, perhapsdrutil can work for you Usage: drutil -drive [drive-arguments] command [command-options-and-arguments] drutil commands are: atip - Displays ATIP information about inserted CD-R/RW media. bulkerase - Bulk erases -RW media in either quick or full mode. drutil bulkerase (quick | full) burn - Burns a given file or directory to disc. drutil burn (burn-options) path cdtext - Displays CD-Text present on an audio CD. discinfo - Displays disc related info when media is present. dumpiso - Parses ISO-9660 directory structures. drutil dumpiso devnode block [format] dumpudf - Parses UDF directory structures. drutil dumpudf devnode block [format] eject - Ejects media from the drive (if any). erase - Erases -RW media in either quick or full mode. drutil erase (quick | full) filename - Translates filenames for different filesystems. drutil filename name getconfig - Displays current and supported device features and profiles. drutil getconfig (current | supported) info - Displays detailed information about connected drives. list - Lists all connected burning devices. poll - Constantly polls and displays device notifications. status - Displays detailed information about inserted media. subchannel - Displays subchannel (MCN, ISRC) info when CD media is present. toc - Displays TOC information about inserted CD media. trackinfo - Displays track related info when media is present. tray - Opens and closes drive tray, and ejects media. drutil tray (open | close | eject) version - Display the OS and DiscRecording version numbers. Hi Ken, Mac and Win. Obviously there is no native Rev function, do you have snippets how to ask the shell for it? Thank you Tiemo -- stephen barncard s a n f r a n c i s c o - - - - - - - - - - - - ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: AW: How to detect a CD Drive / write permissions?
Mac and Win. Obviously there is no native Rev function, do you have snippets how to ask the shell for it? For Mac, you need to use the system_profiler shell command, pass it one of the data types you're interested in, and then parse the result. I'm not sure what Mac OSes you need to support, but here's the basics: 1) Get a list of existing datatypes on the current machine so you can know which ones to check in subsequent commands: put shell(system_profiler -listDataTypes) into tTypesList 2) You'll need to look at a handful of the data types. For example, my setup right now is a MacBook Pro with two external drives attached via USB and a built in R/W CD/DVD. On *my* machine, you query: - the SPParallelATADataType to get data on any mounted CD or DVD in the drive; - the SPSerialATADataType to get data on my internal hard drive; - and the SPUSBDataType to get data on the external hard drives. The way you would call it is: put shell(system_profiler SPUSBDataType) into tUSBData ... and then parse that. You can get a bunch of data types together, but it may make parsing difficult. But the way to do that is: put shell(system_profiler SPUSBDataType SPSerialATADataType) into tData 3) You can get more info on this command by typing man system_profiler in the terminal on OS X. As to Windows, there is a driveType property that you can query with a VBScript, but it uses the Scripting.FileSystemObject object, which may trigger virus protection software installed on the target machine. But if you want to use it, here's the VBScript: - Dim tFSO, tDrive, tType, tDrivePath 'This is where you put in the drive letter you've parsed from a file path Set tDrivePath = C: Set tFSO = CreateObject(Scripting.FileSystemObject) Set tDrive = tFSO.GetDrive( tDrivePath) Select Case tDrive.DriveType Case 0: tType = Unknown Case 1: tType = Removable Case 2: tType = Fixed Case 3: tType = Network Case 4: tType = CD-ROM Case 5: tType = RAM Disk End Select ' If you're using Rev 3.0 or later, use this final line: result = tType ' If you're using Rev 2.9 or earlier, use this line instead: WScript.Echo tType There may be another way to run this without using the Scripting.FileSystemObject, but the only other way I've used is to wrap this code into a DLL, register the DLL and then call on the *DLL* from VBScript. Anyway, hope this helps, Ken Ray Sons of Thunder Software, Inc. Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution