Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6365735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:19:53+00:00 2026-05-25T00:19:53+00:00

I am trying to register two dll:s using a macro that takes these parameters:

  • 0

I am trying to register two dll:s using a macro that takes these parameters:

!macro RegisterWithRegAsm flag executable typeLib

I call the macro like this:

!insertmacro RegisterWithRegAsm “” “Dll1.dll” “Dll1.tlb”
!insertmacro RegisterWithRegAsm “” “Dll2.dll” “Dll2.tlb”

THe problem is I can only run the macro one time cause the second time the NSIS complains that I have already declared a label :

inst__:
StrCpy $R1 ‘$R0${DOT_NET_VERSION_2_SP2}\RegAsm.exe “$INSTDIR\${APP_NAME_COMPACT}\${executable}” /codebase /tlb:”$INSTDIR\${APP_NAME_COMPACT}\${typeLib}” /silent’

How can I move this label (and the u_inst_) outside of the macro so I can use it more than once?

ANyone know of a good site for reference? I have looked at the nsis web page but can’t find references to multiple dll handling.

THanks for any ideas!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T00:19:54+00:00Added an answer on May 25, 2026 at 12:19 am

    One solution is to make the label unique with a prefix:

    !macro UselessExample string
    !define UselessExample_lbl "UselessExample_${__LINE__}" ;prefixing with the macro name is a good way to avoid conflicts
    Goto ${UselessExample_lbl}pointlessjump
    DetailPrint "Hello?"
    ${UselessExample_lbl}pointlessjump:
    DetailPrint "${string}"
    !undef UselessExample_lbl
    !macroend
    
    Section
    !insertmacro UselessExample "Hello1"
    !insertmacro UselessExample "Hello2"
    SectionEnd
    

    Or if you are creating a utility function that will be called in many places it is usually better to create a function. The CallArtificialFunction stuff in util.nsh is a helper macro that makes it easy to turn a macro into a function.

    !include util.nsh
    
    !macro UselessExample string
    Push "${string}"
    ${CallArtificialFunction} UselessExampleWorker
    !macroend
    !macro UselessExampleWorker
    Pop $0
    DetailPrint $0
    !macroend
    
    Section
    !insertmacro UselessExample "Hello1"
    !insertmacro UselessExample "Hello2"
    SectionEnd
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to register a type library programatically from VBA code, using two
I am trying to call this method to concat two arrays using Google Collections
Trying to solve a problem with templatetags. I have two templatetags: @register.inclusion_tag('directory/_alphabet.html') def alphabet_list(names):
I'm trying to register an atl service using ExeName.exe /service as described here: http://msdn.microsoft.com/en-us/library/74y2334x(VS.80).aspx
I am trying to register the following class using the fluent interface: public class
I'm currently trying to register a JS function call from a .NET page which
I am trying to register an interceptor using a annotation-driven controller configuration. As far
i'm trying making a com dll in python. but i try register to compiled
I've created an MSI using WiX. I'm trying to register .NET components for COM
I'm trying to call AMFPHP two times on a single ActionScript method and what

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.