- NSIS Discussion
- registering AcitveX-Exe ?
Archive: registering AcitveX-Exe ?
ASterX
19th February 2004 13:38 UTC
registering AcitveX-Exe ?
Hi there,
does anybody know a way for successfully registering an VB-ActiveX-Exe ?
If one would do it manually one would just start the file with the parameter /regserver -> 'c:\myActiveX.exe /regserver'.
I tried different ways:
- ExecShell "$INSTDIR\${PRODUCTNAME}.exe \regserver" ""
- ExecShell "open" "$INSTDIR\${PRODUCTNAME}.exe \regserver" ""
- Push "$INSTDIR\${PRODUCTNAME}.exe"
Call AddSharedDLL
- RegDll "$INSTDIR\${PRODUCTNAME}.exe"
Nothing worked.
I'm sure there must be a way to solve this (by now I'm running a batch file - doesn't look very nice).
Anyone ANY ideas?
Joost Verburg
19th February 2004 17:31 UTC
Use Exec instead of ExecShell.
ASterX
19th February 2004 20:01 UTC
Well I just forgot to put it in the list - I tried that also but it seemed that no parameters were accepted, one message like "file not found" or similar appeared.
It seemed windoze thought that "C:\myActiveX.exe /regserver"
is only the path to the file and not a path and a parameter. There fore I tried 'ExecShell'.
But when you tell me it works like that you probably have tried it out, it worked and you can tell me what my fault was ?
=>> one correction by the way:
ExecShell "$INSTDIR\${PRODUCTNAME}.exe" "\regserver"
has been my try
Joost Verburg
19th February 2004 20:07 UTC
Of course you do have to put quotes around a filename with spaces.
ExecShell '"$INSTDIR\${PRODUCTNAME}.exe" /regserver'
ASterX
19th February 2004 20:19 UTC
Sorry, no.
It won't do.
I think I nearly tried everything around it, quoted, unquoted, $\"-quoted, with inner and/or with outer quotes, with '- an with "-characters; for being sure I just tried your example again.
It won't do.
Are you sure you have been succesfully registering an VisualBasic-ActiveX-Exe doing it that manner?
ASterX
19th February 2004 20:21 UTC
btw. neither Windows ME nor Windows 2000 seem to work with this
Joost Verburg
19th February 2004 21:10 UTC
No, I have never registered a VB ActiveX EXE, I just explained you how to use Exec.
It it works fine when you are using the Windows console it will work fine this way too.
Spatacoli
19th February 2004 21:59 UTC
Did you try this?
ExecShell 'cmd /C "$INSTDIR\${PRODUCTNAME}.exe" /regserver'
Joost Verburg
19th February 2004 22:17 UTC
That will make absolutely no difference and it won't work on Win9x.
Spatacoli
19th February 2004 22:22 UTC
oh yeah, sorry, I didn't see the OS. please ignore my post.
Vytautas
19th February 2004 23:56 UTC
Originally posted by Joost Verburg
Of course you do have to put quotes around a filename with spaces.
ExecShell '"$INSTDIR\${PRODUCTNAME}.exe" /regserver'
Joost if you use ExecShell shouldn't the command look like this?
ExecShell "open" "$INSTDIR\${PRODUCTNAME}.exe" "/regserver"
Vytautas
Joost Verburg
20th February 2004 07:39 UTC
Yes, I already said that Exec should be used but I copied the wrong line.
ExecShell > Exec
ASterX
20th February 2004 16:20 UTC
Well, thanks to all for wasting their time with this problem.
It's embarassing (and no one will belive me) - my box seems to have had bad days, today it works like Joost said. Everything is behaving like one would expect it as if nothing has been happening.
Again, thank you for your help, it really didn't work yesterday, I promise not to get on anybodys nerves again...