|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Jul 2003
Location: Amersfoort
Posts: 4
|
For a small piece of software and some data files I have to check first if the target disk (D
exists. If not, then install the software on the c: disk.Is there any way to perform this? I have tried ifileexist, but I get compile errors. Searching the discussion I couldnot find a solution. Please help? Thanks. |
|
|
|
|
|
#2 |
|
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,917
|
Does the software wrote registry keys or
have a pre-defined installation path? * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE. |
|
|
|
|
|
#3 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Firstly you can check if the D or C drives exist first like so:
code: The search function is here: http://nsis.sourceforge.net/archive/...ances=0,11,211 -Stu |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Jul 2003
Location: Amersfoort
Posts: 4
|
Thanks for your reply.
First the software does not write registry keys. The goal is to do a silent install. When for the first time we do an install the installer checks 1) for the D: disk and if not present uses the C: disk. The second or the next time an update of the usersoftware is needed, we do the same check. The installation directories have always the same name and structure. Does this help to use the proposed solution.? regards, jan willem |
|
|
|
|
|
#5 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Use my example.
It may need modifying. I would modify it for you but my thinking head is still asleep at the moment ![]() -Stu |
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Jul 2003
Location: Amersfoort
Posts: 4
|
Stu, I would be much obliged, if you could modify it.
Thanks in advance jan willem |
|
|
|
|
|
#7 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Ok, I have my mind in gear a bit more now lol
No need for search functio nat all. code: -Stu |
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Jul 2003
Location: Amersfoort
Posts: 4
|
Many thanks Stu,
With a small modification, this works OK. The IfFileExists needs a *.* to check for the D: disk. code:-------------------------------------------------------------------------------- IfFileExists "D:\*.*" 0 install_on_c DetailPrint "Installing software to D: drive" ## place files here ## Goto done install_on_c: DetailPrint "Installing software to C: drive" ## place files here ## done: -------------------------------------------------------------------------------- |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|