CopyMinder Knowledge Base
Browse By Category: | Look Up Error Number: | Search: |
Glossary | Contact Us |
Running CMInstall twice kills my original .cm.ini file
Views: 1660
Rating: 40
Rating: 40
Rate It:
Description
I have created a .cm.ini file that contains some parameters that I want pre-set. I ship this .cm.ini file with my product.
When CMInstall is run, it copies these .cm.ini file parameters into the correct directory. However, if I re-run CMInstall, it loses my parameters.
Solution
If no /S option is specified on the CMInstall command line, CMInstall copies the .cm.ini file from the CMInstall directory into the user data area (e.g. C:\Documents and Settings\All Users\ABC\MyProduct\cm) and adds the ProductKey= line. It then creates a simple .cm.ini file in the program directory. If CMInstall is run again from the same directory as the program directory then it will copy this simple file into the user data area.
You can avoid the problem by using separate directories for CMInstall and the protected program.
If the protected program is to be installed into "C:\Program Files\MyProgram", you should put CMInstall.exe, the original .cm file and the original .cm.ini file into a "C:\Program Files\MyProgram\CMInstall" directory )for example) and run CMInstall from there using:
C:\Program Files\MyProgram\CMInstall\CMInstall.exe /K /P C:\Program Files\MyProgram.
Alternatively, you could use the /S option in CMInstall to point to a directory containg the original .cm and .cm.ini files.
I have created a .cm.ini file that contains some parameters that I want pre-set. I ship this .cm.ini file with my product.
When CMInstall is run, it copies these .cm.ini file parameters into the correct directory. However, if I re-run CMInstall, it loses my parameters.
Solution
If no /S option is specified on the CMInstall command line, CMInstall copies the .cm.ini file from the CMInstall directory into the user data area (e.g. C:\Documents and Settings\All Users\ABC\MyProduct\cm) and adds the ProductKey= line. It then creates a simple .cm.ini file in the program directory. If CMInstall is run again from the same directory as the program directory then it will copy this simple file into the user data area.
You can avoid the problem by using separate directories for CMInstall and the protected program.
If the protected program is to be installed into "C:\Program Files\MyProgram", you should put CMInstall.exe, the original .cm file and the original .cm.ini file into a "C:\Program Files\MyProgram\CMInstall" directory )for example) and run CMInstall from there using:
C:\Program Files\MyProgram\CMInstall\CMInstall.exe /K /P C:\Program Files\MyProgram.
Alternatively, you could use the /S option in CMInstall to point to a directory containg the original .cm and .cm.ini files.
More Help
If this article did not help you to solve your problem, please use the menu at the top of the page to browse or search more articles, or to contact our support team.
Others in this Category