Jump to content











Photo
- - - - -

Variables in registry entries. LiveXP


  • Please log in to reply
3 replies to this topic

#1 ylafont

ylafont

    Member

  • Members
  • 54 posts
  •  
    United States

Posted 15 November 2013 - 06:40 AM

Quick question.

 

I was  rewriting  Acronis Echo Enterprise server script  and place the %Program Files% variable in registry entries like so.

 

reg_add,0x1,"%reg%\Acronis\TrueImageEcho\CommonComponents","fcalloc.dll","%Program Files%\Common Files\Acronis\TrueImageEcho\Fomatik\fcalloc.dll

 

However, When  I went to launch Echo Server it fails because it could not find the common files as above.  Only after I replace the variable with “X:\Program Files” did the application work in LiveXP.

 

Am I missing something? Thanks.



#2 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12686 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 15 November 2013 - 08:42 AM

%Program Files% causes the build to write the current value to the target registry.

 

Maybe at that time it does not contain the "X:" ?

Check the value in the log.

 

BTW: The space in %Program Files% looks strange for me :cheers:

 

Peter



#3 ylafont

ylafont

    Member

  • Members
  • 54 posts
  •  
    United States

Posted 15 November 2013 - 05:04 PM

I had to hard code "X:\Program Files" for now.  I was getting weird result.  I also tried %PE_Programs% and the value placed in the registry was %Program files (x86)% 

 

... and that variable is available on  the local machine performing the build.



#4 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12686 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 15 November 2013 - 06:15 PM

When you want to output your local programs folder, you have to use WinBuilder's variable %ProgramFilesDir% rather than %Program Files%

 

When you want to replace your local system drive letter by x:, it is a bit more complicated:

StrFormat,LEN,%ProgramFilesDir%,%Len%
StrFormat,DEC,%Len%,3
StrFormat,MID,%ProgramFilesDir%,4,%len%,%ProgramFolder%
Set,%ProgramFolder%,X:\%ProgramFolder%
reg_add,0x1,"%reg%\Acronis\TrueImageEcho\CommonComponents","fcalloc.dll","%ProgramFolder%\Common Files\Acronis\TrueImageEcho\Fomatik\fcalloc.dll

Peter






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users