|
|
|
|
#1 |
|
Junior Member
Join Date: Jul 2010
Posts: 14
|
Check for CD Volume
Hey everyone. I'm working on a project where I need to modify my existing installer to provide the option of copying some files from the original installation CD instead of downloading them. I did find the NSIS CDROM plugin but I'm not exactly sure what I should be doing with it to achieve my goal.
In essence, the plugin would: 1. Probe for the next cd/dvd drive 2. check for the CD volume label "PRODUCT1", if it is not found repeat step 1 3. Copy the "DATA" directory from the volume to the install directory Obviously the last part is pretty simple, but I'm not sure what I should be doing to achieve parts 1 and 2. Any help is appreciated. |
|
|
|
|
|
#2 |
|
Forum King
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
|
Have a look at the CD-ROM plug-in
|
|
|
|
|
|
#3 | |
|
Junior Member
Join Date: Jul 2010
Posts: 14
|
Quote:
|
|
|
|
|
|
|
#4 |
|
Major Dude
Join Date: Feb 2007
Posts: 672
|
Have you checked the plugin example?
It's al there. |
|
|
|
|
|
#5 |
|
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 916
|
I've noticed that several of my older multi CD games don't require physical media to install, just dumping all the files into one directory is enough for it to install correctly (running it is a different story).
I know you have found my WimImage plugin (with multi-disc tweaks), and all I use to check for the next file is an IfFileExists call in a loop, and it displays a message box if not found. So, storing the files in an archive (zip, 7z, wim) and checking for a single file is quite a bit easier to implement. Here's a couple of un-archiver plugins (I used to use zipdll, now I use my own plugin): http://nsis.sourceforge.net/ZipDLL_plug-in http://nsis.sourceforge.net/Nsis7z_plug-in WimImage is also good, although it requires Windows 7 and up which is not great for Vista and earlier users. "Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 225
|
This should do what OP wants:
code: PostEnd: |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Mar 2009
Posts: 41
|
But not all CD have a volume label. Often you have to ID a disc by other means, such as searching for a specific file on the disc.
|
|
|
|
|
|
#8 |
|
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 916
|
That's the reason that older multi-disc installs work when dumped into a folder, because they only check for the required files, not volume labels.
"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
|
|
|
|
|
#9 | |
|
Junior Member
Join Date: Jul 2010
Posts: 14
|
Quote:
Basically, you guys are saying I should just check if the files are in the proper structure on the disk? |
|
|
|
|
|
|
#10 |
|
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 916
|
Yes, because that way you can put the entire install in a folder for initial testing, and move to .iso and a virtual disc drive for actual testing. I haven't tested WimImage on a virtual drive yet, but it should work as the source path doesn't change.
"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|