Archive: WriteRegStr Problem


WriteRegStr Problem
  I have a weird problem with this entry, causing the installer to freeze:

WriteRegStr HKLM "Software\Microsoft\Internet Explorer\Extensions\{5ABDF6B0-336E-41e8-ADF2-76629F963BD6}" "MenuText" "Queue Sales Records"


This entry works OK.
WriteRegStr HKLM "SOFTWARE\Microsoft\Internet Explorer\Low Rights\ElevationPolicy\{ED1FA840-C3FD-11dd-AB02-00045A7930B1}" "Policy" "3"

An additional oddity is that if OutFile is install.exe I get the problem, if it is setup.exe I don't.

Anyone got any ideas?

Thanks

Andrew


I have just discovered that this is only on XP. On Windows 7 they both freeze the installer.


Do you have RequestExecutionLevel admin?

Stu


Thanks Stu

I do now but it hasn't changed anything.

I thought I'd write to a .reg file and run that but I would need to escape \ characters in file names.


It's definitely to do with the braces as removing them fixes it.

I suspect a problem in the string parser but don't know why that wouldn't have cropped up before?


In fact just removing the right brace solves it.

Any ideas?

Thanks


It seems that it is interfering with the execution. The value is written and if I put MessageBox MB_OK "Hello" straight after, the system beeps, the message box shows and then freezes.


Definitely something in the string parser, if I change the Key from ...\Extensions\{... to ...\Extension\{... it works.



OutFile test.exe

RequestExecutionLevel admin
page instfiles
Section
WriteRegStr HKLM "Software\Microsoft\Internet Explorer\Extensions\{5ABDF6B0-336E-41e8-ADF2-76629F963BD6}" "MenuText" "Queue Sales Records"
>SectionEnd
>
Does this crash?

Thanks Anders

Unfortunately no. I've tried it in isolation but it doesn't cause any problem.

I'll do some more tests.


I think I'll have to leave this for the moment. If I remove everything except the WriteRegStr lines from the installer, it works OK.

I've now got a workaround by writing to a .reg file but at some pount I'll go through and see what combination causes the problem.

Thanks


You could also try putting the key in a variable. Either way it shouldn't crash so yeh when you get back to it it'll be nice to find out what is causing it. I've never seen this problem.

Stu


I have discovered that removing this:

SetOverwrite ifnewer
SetOutPath $SYSDIR
File "SystemCpy\*.*"

and replacing them with calls to InstallLib removes the problem.

But I simply haven't been able to reproduce this in isolation.


Forgot to mention that the important line is SetOutPath, if that isn't set to $SYSDIR everything works.

The DLL's being in use or not when I installed didn't seem relevant.