rawy
3rd March 2006 14:57 UTC
How to: register EXE silently?
Hello,
How can i register “myApp.EXE” silently (without windows message : Register/Unregister sussessful)?
I first use ExecShell & Execwait like:
ExecShell "open" "MyApp.EXE" "/RegServer" SW_HIDE
and also call system.dll like:
StrCpy $0 "open
StrCpy $1 "MyApp.EXE"
StrCpy $2 "/RegServer”
System::Call 'shell32::ShellExecute(v,t,t,t,t,i) v(,r0,r1,r2,,0)'
But I have always this message :( .
My Uninstall section cannot delete “myApp.exe” after unregistered!
Thank you for help
Afrow UK
3rd March 2006 17:59 UTC
I've never worked with regserver really but is this the same as using NSIS' RegDLL instruction?
-Stu
bholliger
5th March 2006 20:34 UTC
Hi!
Could you do the same with "regsvr32.exe /s myapp.exe" (install) and "regsvr32.exe /u /s myapp.exe" (uninstall)?
-Bruno.
dienjd
6th March 2006 03:49 UTC
I think rawy is referring to registering a COM-based EXE--done by supplying '/Regserver' on the command line. regsvr32.exe only applies to registering DLLs.
rawy, have you checked MyApp.exe's source to see if that dialog is debug code? There shouldn't be a built-in success/failure dialog as there is with regsvr32.exe.
After unregistering, if you can't delete MyApp.exe, it is probably still in-use. You can send a close message to it or get violent and terminate its process before having your uninstaller try to delete it.
bhaelochon
8th March 2006 14:37 UTC
I do it like this:
ExecWait '"$PROGRAMFILES\MyApp\MyApp.exe" /regserver' ;register
ExecWait '"$PROGRAMFILES\MyApp\MyApp.exe" /unregserver' ;unregister
This is for ActiveX EXEs created in VB.