Go Premium for a chance to win a PS4. Enter to Win


Changing Application name and help files names.

Posted on 2002-03-20
Medium Priority
Last Modified: 2013-11-20
I have an MDI VC++6 application.  When I built the last version a couple of years ago, I foolishly named it something like MyApp30, so all the cpps, etc are named MyApp30.cpp.  When I compile it, of course, it creates MyApp30.exe and MyApp30.hlp, .cnt, etc.  Now I'm creating version 4.0 and want to use the same classes, project, etc. but change the executable and help files to MyApp40.  I changed the output name to MyApp40.exe in Settings and changed MyApp30 to MyApp40 anywhere else I could find short of changing the class names and file names within the project.  

My problem is that the help files are still named MyApp30.  I saved the .dsw, .dsp, .hm, etc. as MyApp40. I changed MyApp30 to MyApp40 inside Help Workshop. Frankly, I just started changing 30 to 40 everywhere I could find it - even inside MakeHelp.bat.  The result is that it compiles MyApp40.hlp and .cnt within the "hlp" folder (not in the Release or Debug folders) but when I try to execute the MyApp40.exe I get the following message:
"One or more files are out of date... These files need to be built.  .\Release\MyApp30.hlp"

I tried changing m_pszHelpFilePath and m_pszAppName to MyApp40... in my app's InitInstance function and that didn't change things.  I really have changed it to "40" everywhere I can think of short of changing the names of the classes and file names (a chore I'd like to avoid).

I'd like to have the compiler compile the 40 version and execute using the MyApp40.hlp files (I don't want to release with "MyApp30.hlp" files).  Any ideas on what I'm missing.  An overview of how to change an application's name and help files might help.  Thanks in advance.
Question by:jjjkkklll

Expert Comment

ID: 6883393
You may also have to change your string table in your resources and change the output name in your project settings.

Project -> Settings -> Link [tab]-> Output File Name

Expert Comment

ID: 6883401
...also look for any "custom build" steps in your project settings.

Author Comment

ID: 6883500
Yeah, I changed the Application Name in the string table, and the output name in Settings.  I also changed "30" to "40" in as many places as I could search and find in Settings.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 86

Expert Comment

ID: 6883704
Find "<projectname>.hpj" (usually in "<projectdir>\hlp" and open it using a text editor. Change the filenames there. BTW, this also works for .dsp/.dsw files, as they are plain text files also. Be sure to make a backup copy before editing them , though :o)

Accepted Solution

inpras earned 800 total points
ID: 6883771
recheck the following points
1. open ALL files in notepad one after another in directory myapp30 and all its sub directories. Rename each occurance of the myapp30 to myapp40 this includes hlp and res directories too
2. rename eachfile from myapp30 to myapp40
you should get the result what you are expecting
Hope this helps

Expert Comment

ID: 6884430

Expert Comment

ID: 6884605
Just do the following.
1)Open ur *.hpj file and click on Map there u get dialog box where u have include ur myapp40.hm removing #includemyapp30.hm and compile it.
2)Now open the "makehelp.bat" file which is present in the current project working folder and edit for changing the file names from myapp30 to myapp40.and  run it.
That should be doing ur job.


Author Comment

ID: 6884705
Pagladasu's link came a little too late.  I changed all the "MyApp30"s to "MyApp40"s by hand, one file at a time.  Then, when I tried to load the dsw file and Msdev.exe crashed.  I had quite a headache for a while there.  Then, I thought to search for the text "msdev" in files in the folder.  It came up with MyApp40.ncb as the culprit.  I merely deleted it - and when I opened the dsw file... presto, it regenerated the ncb file and loaded the project with the new name.  I built it and everything works great.  I credit inpras as the inspiration that got me through this.  Thanks.

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question