Windows has a file named c:\Windows\hh.exe
that I need to replace, but I am getting stumped by writing privileges, I think.
My script contains this
!include x64.nsh
RequestExecutionLevel admin
.
.
.
SetOutPath $WINDIR
File Files\hh.exe
But when I run the script, it reports
Output Folder: C:\Windows
Skipped: hh.exe
What do I need to do to replace hh.exe in the Windows folder?
can't write a file to $WINDIR
10 posts
Normally I'd tell you to change the overwrite mode but hh.exe is a system file that you should not be messing with. Why do you think you need replace it?
Thanks for the reply. hh.exe is evidently used to display Windows compiled help files (files with .chm extension). I build my .chm file for my application using ForeHelp. ForeHelp comes with its own version of hh.exe because the Microsoft version has bugs (I think). The Microsoft Win 7, 8 and 10 versions cause my .chm file to throw scripting errors, and the ForeHelp version doesn't. The version that comes with Vista seems to work without errors.
I did some testing in a Win 7 virtual machine, and Win 7 made me do all sorts of file security and permission things to allow me to replace c:\Windows\hh.exe.
But there are other weird things going on I don't understand. My .chm can be launched by my application (which runs in Excel VBA) or by double clicking the .chm in Windows Explorer. When run from Excel VBA, the chm runs as some kind of subprocess to Excel, and script errors do not occur. But if double clicked in Explorer, script errors do occur. I wish I knew why this happens, but I have no idea.
I guess I could just be happy with my chm running ok as a subprocess to Excel. But if I can replace hh.exe, then it will run error free from Explorer, too.
I did some testing in a Win 7 virtual machine, and Win 7 made me do all sorts of file security and permission things to allow me to replace c:\Windows\hh.exe.
But there are other weird things going on I don't understand. My .chm can be launched by my application (which runs in Excel VBA) or by double clicking the .chm in Windows Explorer. When run from Excel VBA, the chm runs as some kind of subprocess to Excel, and script errors do not occur. But if double clicked in Explorer, script errors do occur. I wish I knew why this happens, but I have no idea.
I guess I could just be happy with my chm running ok as a subprocess to Excel. But if I can replace hh.exe, then it will run error free from Explorer, too.
Build again your .chm file with other application. 🙂
If you mean to build the chm with something other than ForeHelp, I tried HelpSmith and HelpNDoc and both of those had script errors. I used their "trial" versions, and imported my chm project into those apps.
Microsoft really don't want you to change system files in $windir and $sysdir so they make it harder to do with every version. Windows File Protection will detect bad copies and replace them with a fresh Microsoft version. In Vista and later most system files are owned by TrustedInstaller and you have to take ownership before you can change the ACL and owerwrite.
Even if you are willing to get past all of this you should think about what would happen if everyone did this! What if another 3rd-party replaced hh.exe with something that works on their chm file but perhaps breaks yours. Please don't go down this route. It is much better if you file a bug report to the people that make your helpfile generator.
Even if you are willing to get past all of this you should think about what would happen if everyone did this! What if another 3rd-party replaced hh.exe with something that works on their chm file but perhaps breaks yours. Please don't go down this route. It is much better if you file a bug report to the people that make your helpfile generator.
I agree completely, and I'm going to stop pursuing this. I really never did want to replace any Microsoft files in that folder for the very reasons you mentioned. I am presently working on another approach to my problem that should eliminate the need to do this.
Microsoft's files which are in the C:\Windows folder for supporting .chm help files seem to harken back to the days of XP.
Microsoft's files which are in the C:\Windows folder for supporting .chm help files seem to harken back to the days of XP.
It is older than that, Win98 was the first with it out of the box but NT4 and Win95 will probably have it if they have installed IE5 or the html help redistributable.Originally Posted by xlrotor View PostMicrosoft's files which are in the C:\Windows folder for supporting .chm help files seem to harken back to the days of XP.
XP still used the older .hlp files for the popup help/"What's this?". All that stuff was removed in Vista.
Hmm. That's good to know. ForeHelp will generate either a hlp or chm from my project. I've been shipping both with my app, and give the user the option to select which to use. But I have decided to drop the hlp version altogether from here on.
I wonder how long the chm version of windows help will last. Microsoft hasn't upgraded it in any way that I can tell in probably 15 years or more.
I wonder how long the chm version of windows help will last. Microsoft hasn't upgraded it in any way that I can tell in probably 15 years or more.
There has been at least 3 new formats after this, one for Vista+ and two for Visual Studio but they are not exactly supported for ISVs. See https://en.wikipedia.org/wiki/Online...help_platforms for more.Originally Posted by xlrotor View PostI wonder how long the chm version of windows help will last. Microsoft hasn't upgraded it in any way that I can tell in probably 15 years or more.