Disable of Drive
Hello,
I would like to know one more thing. I want to know if we can disbale the drive (C: or D:) in the nullsoft Installer.
Please let me know if anybody has any idea.
Thanks in advance,
Naina
Archive: Disable of Drive
Disable of Drive
Hello,
I would like to know one more thing. I want to know if we can disbale the drive (C: or D:) in the nullsoft Installer.
Please let me know if anybody has any idea.
Thanks in advance,
Naina
Use the .onVerifyInstDir callback...
Function .onVerifyInstDir
StrCpy $0 $INSTDIR 2
StrCmp $0 "C:" PathBad
StrCmp $0 "D:" 0 PathGood
PathBad:
Abort
PathGood:
FunctionEnd
Function .onVerifyInstDir
StrCmp $INSTDIR "C:" PathBad
StrCmp $INSTDIR "D:" 0 PathGood
PathBad:
Abort
PathGood:
FunctionEnd
Hello,
Thanks for your quick reply. But I guess the solution that you have given is not working for my requirement.
Actually as per my requirement, Installer has to create a directory structure so that the folder always have to start from the drive itself. for example, C:\DVT and D:\DVT. User should not be allowed to install in any other folder except C:\DVT or D:\DVT, we should be able to disable other folders.
I donno if it is possible to control the user to do like that in Nullsoft Installer. Please let me know if you have any idea to solve this as early as possible.
Thanks in advance,
Naina
Hello,
Thanks for your quick reply. But I guess the solution that you have given is not working for my requirement.
Actually as per my requirement, Installer has to create a directory structure so that the folder always have to start from the drive itself. for example, C:\DVT and D:\DVT. User should not be allowed to install in any other folder except C:\DVT or D:\DVT, we should be able to disable other folders.
I donno if it is possible to control the user to do like that in Nullsoft Installer. Please let me know if you have any idea to solve this as early as possible.
Here is my code attached.
Thanks in advance,
Naina
Originally posted by NainaWell then maybe this will work. :)
Installer has to create a directory structure so that the folder always have to start from the drive itself. for example, C:\DVT and D:\DVT. User should not be allowed to install in any other folder except C:\DVT or D:\DVT, we should be able to disable other folders.
Function .onVerifyInstDir
StrCpy $0 $INSTDIR 5 1
StrCmp $0 ":\DVT" PathGood
Abort
PathGood:
FunctionEnd
Regarding disable of drive
Hello,
Thanks for the reply. I tried with the given code. But it is disabling the "Install" button. So am not able to install. I should be able to install only with the drives C:\DVT and D:\DVT and if the folder is other than the DVT, I should be able to disable the Install button that time.
Please let me know if it is possible to do like this.
Thanks,
Naina
Are you sure you picked the right path? The install button should be grayed out unless you pick the right path--one that contains <drive>:\DVT (I tested it on my own and it seems to work fine.)