Jump to content


Photo

[REQUEST] How to using CustomDestination Directive ?


  • Please log in to reply
16 replies to this topic

#1 Ken@fri

Ken@fri

    WinCert Friend

  • Members
  • PipPipPipPip
  • 237 posts
  • Location:Libreville
  • OS:Windows 7

Posted 22 April 2010 - 12:22 PM

Hi everybody!



////////////////////////////// REQUEST #1 /////////////////////////////////////////


I'm workin' on Nero 8.3.20.0 Lite/Micro true addon (english/french). One thing missing : i plan to check reg entries about nero previous versions(v7/v8).

If ONE of these reg entries is found, a message will prompt user : "A previous version of Nero has been founded on your system. Please uninstall it before continuing.". This will abort addon installation.

I'm tryin' to use CustomDestination directive to check Windows registry. But i'm little bit confused about its using.

[Install.Nero8Lite]
11,,rundll32.exe,,,"advpack.dll,LaunchINFSection %01%\Nero8L.inf,Install"


[Install]
BeginPrompt = ...
CustomDestination = Nero.PreviousVersions.Detected
RunPreSetupCommands = Create.i386:1,MSVC++2005.Check:1,Nero8PreInstall.Check:1


[Nero.PreviousVersions.Detected]
49000=Nero7Lite.Check,22


[Nero7Lite.Check]
"HKLM","SOFTWARE\Nero\Installation\Families\Nero 7","","%Nero7Lite_FOUNDED%.",""


[Strings]
Nero7Lite_FOUNDED="A previous version of Nero has been founded on your system. Please uninstall it before continuing"


Durant my tests, this above prompt message is shown, even there's no regentries for NERO.




////////////////////////////// REQUEST #2 /////////////////////////////////////////


I'm also workin' on an addon for Nero 9.4.26.0b. And i'm lookink for how to check if .NET Framework 3.0 (Registry check) is installed or not.

PLEASE YOUR HELP, LINKS & ADVICES WILL VERY APPRECIATED. THANX

Edited by Ken@fri, 22 April 2010 - 12:25 PM.


#2 ricktendo

ricktendo

    Group: Banned

  • Global Mods
  • 7,765 posts
  • Location:La Ceiba
  • OS:Windows 8 x64

Posted 22 April 2010 - 01:53 PM

This only works the other way around...if the program/reg-entry is NOT installed it will fail, only if it finds the registry entry will it install

Yes your second request is what this is used for, to check for a registry entry...if it finds .net 3.0 reg entry you specify ONLY then will it proceed

#3 Alpha_95

Alpha_95

    WinCert Friend

  • Members
  • PipPipPipPip
  • 137 posts
  • OS:non-selected

Posted 22 April 2010 - 04:22 PM

He commend is possible to do the same with the process?

If the process is mon_processus.exe then kill it and if it does not exist, ignores the command taskkill

#4 DaRk MaDnEsS

DaRk MaDnEsS

    Live Free or Die Hard

  • Contributors
  • 971 posts
  • Location:Some where out computer
  • OS:Windows 7

Posted 22 April 2010 - 04:42 PM

something like

Runpresetupcommands =Close.IDM:1

[Close.IDM]
"CMD /Q /C taskkill /f /t /im ""idman.exe"""

#5 Alpha_95

Alpha_95

    WinCert Friend

  • Members
  • PipPipPipPip
  • 137 posts
  • OS:non-selected

Posted 23 April 2010 - 12:38 AM

Thanks Dark.

It's correctly :
[Install]
CustomDestination=RessourceHacker.Detected

[RessourceHacker.Detected]
49000=RessourceHacker.Check,1

[RessourceHacker.Check]
"HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111194}","","% %.","" RessourceHacker_FOUNDED

[Strings]
RessourceHacker_FOUNDED = "Une version Ressource Hacker a été trouvée sur votre système. Veuillez le désinstaller avant de poursuivre !"

I would check the registry keys are not existing by another addon (Icon in the Control Panel) and if it exists, you one can modify a command in the file. L?

Sorry to take your topic but your subject interests me greatly!

#6 DaRk MaDnEsS

DaRk MaDnEsS

    Live Free or Die Hard

  • Contributors
  • 971 posts
  • Location:Some where out computer
  • OS:Windows 7

Posted 23 April 2010 - 08:14 AM

Thanks Dark.

It's correctly :

[Install]
CustomDestination=RessourceHacker.Detected

[RessourceHacker.Detected]
49000=RessourceHacker.Check,1

[RessourceHacker.Check]
"HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111194}","","% %.","" RessourceHacker_FOUNDED

[Strings]
RessourceHacker_FOUNDED = "Une version Ressource Hacker a été trouvée sur votre système. Veuillez le désinstaller avant de poursuivre !"

I would check the registry keys are not existing by another addon (Icon in the Control Panel) and if it exists, you one can modify a command in the file. L?

Sorry to take your topic but your subject interests me greatly!


can you explain if it exist what would it do

cause i can't understand what you want ?

#7 Ken@fri

Ken@fri

    WinCert Friend

  • Members
  • PipPipPipPip
  • 237 posts
  • Location:Libreville
  • OS:Windows 7

Posted 23 April 2010 - 09:09 AM

:welcome: :welcome: :welcome:


@ ricktendo64, Alpha_95, DaRk MaDnEsS

Thanx 4 ur replies & contributions :thumbsup_anim: .

I finally choose to use RunPreSetupCommands to solve my problem.

Bye !

Edited by Ken@fri, 23 April 2010 - 10:47 AM.


#8 Alpha_95

Alpha_95

    WinCert Friend

  • Members
  • PipPipPipPip
  • 137 posts
  • OS:non-selected

Posted 23 April 2010 - 10:02 AM

Ken@fri, si tu es meilleur que moi pour traduire, voici le texte en français :

Actuellement sur mon système, j'ai ces clés :
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111110}
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111111}
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111112}
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111113}
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111114}
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111115}
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111116}
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111117}

jusqu'à HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111195}


Lors de la création de mon addon, j'aimerais vérifier que la clé utilisée dans mon addon ne soit déjà pas utilisée pour éviter un conflit. Si la clé n'existe pas, on laisse l'installation de l'addon finir et si elle existe, on lui propose d'interrompre l'installation ou si possible on créer une nouvelle clé à la place de celle existante.


Si tu comprend ma demande, je ne suis pas sur d'être claire parfois lol


Currently on my system, I have these words:
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111110}
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111111}
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111112}
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111113}
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111114}
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111115}
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111116}
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111117}

to the key:
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111195}


When creating my addon, I verify that the key used in my addon is already not used to avoid conflict. If the key does not exist, we leave the facility and finish the addon if it exists, we offered him to abort it if possible or create a new key to replace the existing one.

#9 Ken@fri

Ken@fri

    WinCert Friend

  • Members
  • PipPipPipPip
  • 237 posts
  • Location:Libreville
  • OS:Windows 7

Posted 23 April 2010 - 12:04 PM

HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111110}
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111111}
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111112}
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111113}
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111114}
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111115}
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111116}
HKCR,"CLSID\{D14ED2E1-C75B-443c-BD7C-111111111117}


Hello Alpha_95 !

Dans le modèle COM (utilisé par ActiveX), les CLSID sont utilisés uniquement pour différencier les classes des objets. Cela veut dire que deux versions d'un composant peuvent avoir exactement le même nom, mais être discernables par leur CLSID. Chacune de ces classes implémente différentes interfaces identifiées chacune par un IID.
(dixit Wikipedia)


Les clés ci-dessus sont donc probablement créées après enregistrement d'un fichier de type DLL, EXE, AX... inclu dans ton appli.

  • Enregistrement

    16422,"%CHEMIN_VERS_TA_DLL%",TA_DLL.dll,1

    REGSVR32 /S """%16422%\%CHEMIN_VERS_TA_DLL%\TA_DLL.dll"""



Si c'est le cas, il te suffit d'ajouter une commande de désenregistrement pour supprimer ces entrées.

  • Désenregistrement

    16422,"%CHEMIN_VERS_TA_DLL%",TA_DLL.dll,1

    REGSVR32 /S /U """%16422%\%CHEMIN_VERS_MA_DLL%\MA_DLL.dll"""


Donc, à priori, il est inutile de rechercher la présence de l'une de ces clés dans le Registre avant l'install.


En espérant t'avoir aidé... C U :icon_cool:

#10 Alpha_95

Alpha_95

    WinCert Friend

  • Members
  • PipPipPipPip
  • 137 posts
  • OS:non-selected

Posted 23 April 2010 - 12:29 PM

ah..... oups.....

pourtant sur le net, on trouve que cela ajoute l'icône au panneau de configuration xD

Tu utilise quel clé alors toi ?

Merci pour ton information !

Edit: je suis confus ^^ les clés de registre pour le panel sont :
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\D14ED2E1-C75B-443c-BD7C-111111111294"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\D14ED2E1-C75B-443c-BD7C-111111111294",,,"Add My Prog to The Control Panel"

Peut t'on les vérifier ? si elle existe peut t'on faire une modification avant de procéder à l'installation ?

Edited by Alpha_95, 24 April 2010 - 12:53 AM.


#11 Ken@fri

Ken@fri

    WinCert Friend

  • Members
  • PipPipPipPip
  • 237 posts
  • Location:Libreville
  • OS:Windows 7

Posted 26 April 2010 - 10:18 AM

Salut Alpha_95 :welcome: !

Les entrées de ton soft pour affichage dans le Panneau de configuration peuvent être SIMPLEMENT supprimées AVANT L'INSTALL (avant réécriture éventuelle) :


[DefaultInstall]
RegisterDlls = Install.TON_APPLI


[Install.TON_APPLI]
11,,rundll32.exe,,,"advpack.dll,LaunchINFSection %01%\TON_FICHIER_INF.inf,Install"


[Install]
BeginPrompt = BeginInsPrompt
RunPreSetupCommands = Create.i386:1,PreInstall.Check:1
CopyFiles = @TON_FICHIER_INF.inf,...
AddReg = CPL.Entries.AddReg
RunPostSetupCommands = Delete.i386


[PreInstall.Check]
DelReg = CPL.Entries.DelReg


[CPL.Entries.DelReg]
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\D14ED2E1-C75B-443c-BD7C-111111111294"


[CPL.Entries.AddReg]
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\D14ED2E1-C75B-443c-BD7C-111111111294"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\D14ED2E1-C75B-443c-BD7C-111111111294",,,"Add My Prog to The Control Panel"





Voici, par exemple, comment j'ajoute/supprime une icône pour Nero ControlCenter dans le Panneau de config (le GUID a été généré à l'aide du soft M$ cité + bas) :

[NeroControlCenter.CPL]
HKCR,"CLSID\{28E478E3-EC15-4531-9BF2-64603C35AE7A}"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{28E478E3-EC15-4531-9BF2-64603C35AE7A}"

HKCR,"CLSID\{28E478E3-EC15-4531-9BF2-64603C35AE7A}",,,"Nero ControlCenter"
HKCR,"CLSID\{28E478E3-EC15-4531-9BF2-64603C35AE7A}","InfoTip",,"Maintenez Nero à jour !"
HKCR,"CLSID\{28E478E3-EC15-4531-9BF2-64603C35AE7A}\DefaultIcon",,,"%16427%\%Nero_Web%\SetupX.exe"
HKCR,"CLSID\{28E478E3-EC15-4531-9BF2-64603C35AE7A}\Shell\Open\command",,,"""%16427%\%Nero_Web%\SetupX.exe"" MODE=""update"""
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{28E478E3-EC15-4531-9BF2-64603C35AE7A}",,,"Ajoute Nero ControlCenter au Panneau de configuration."




Si t'as d'autres questions ou souhaites approfondir, RDV sur le sous-forum FR de wincert. Créés-y un nouveau topic et fournis moi le lien par MP, ou on se retrouve sur le site de Moebius ?



//////////////////////////////////////////////////////////////////////////////////////////////////////////


I use Microsoft Exchange Server GUID Generator (GUIDGen) to generate GUID's.

If u've more questions, please let's continue this discussion in french on Wincert's French sub-forum or on Moebius' site. OK?

Thanx :thumbsup_anim: .

Edited by Ken@fri, 26 April 2010 - 10:24 AM.


#12 Alpha_95

Alpha_95

    WinCert Friend

  • Members
  • PipPipPipPip
  • 137 posts
  • OS:non-selected

Posted 07 May 2010 - 07:41 PM

something like

Runpresetupcommands =Close.IDM:1

[Close.IDM]
"CMD /Q /C taskkill /f /t /im ""idman.exe"""



Hello,

I wanted to do the same to check if the program is installed then it will uninstall it and then proceed to normal installation :
[Version]
Signature = $ Windows NT $

[Optional Components]
My_Prog

[My_Prog]
OptionDesc = "My_Prog"
Tip = "My_Prog"
Modes = 0,1,2,3
AddReg = Tweaks.DelReg,My_Prog.AddReg,Remove
CopyFiles = My_Prog.copy,My_Prog1.Copy,My_Prog2.Copy
ProfileItems = My_Prog.ShortCut, My_Prog.QLShortCut,My_Prog.SendTo.ShortCut

[DefaultInstall]
RegisterDLLs = Install.My_Prog

[Install.Mon_Prog]
11,, rundll32.exe,, 210, "advpack.dll, LaunchINFSection%01%\My_Prog.inf,Install"

[Install]
BeginPrompt = BeginInsPrompt
; SoftInstall.Check: 1>> checked if the software are already installed mode silencieu
; Create.Soft: 1>> Creation of empty directories
Runpresetupcommands=Create.i386:1, SoftInstall.Check:1;Create.Soft:1
AddReg = Tweaks.DelReg,My_Prog.AddReg,Remove
; Added tweak for the reorganization of the start menu
DelReg = Tweaks.DelReg
CopyFiles = @My_Prog.inf,My_Prog.copy,My_Prog1.Copy,My_Prog2.Copy
ProfileItems = My_Prog.ShortCut, My_Prog.QLShortCut,My_Prog.SendTo.ShortCut
RunPostSetupCommands = Delete.i386
EndPrompt = EndInsPrompt

; Creation of empty directories
[Create.Soft]
"CMD /Q /C MD ""%16422%\My_Prog\downloads" ""
"CMD /Q /C MD ""%16422%\My_Prog\downloads\archive" ""
"CMD /Q /C MD ""%16422%\My_Prog\screenshots" "
"CMD /Q /C MD ""%16422%\My_Prog\videos

[BeginInsPrompt]
Title = "%% TitlePrmpt"
Prompt = "%% BegPrmpt"
ButtonType = YESNO

[EndInsPrompt]
Prompt = "%% EndPrmpt"

[Create.i386]
"CMD /Q /C MD" "%1%\i386" COPY & /D /Y ""%1% \ *.cab "" ""%1%\ i386 "COPY & /D / Y ""%1%\*.inf"" ""%1%\i386 """

[Delete.i386]
RUNDLL32 advpack.dll, DelNodeRunDLL32 %1%\i386, 8

[SoftInstall.Check]
"CMD /Q /C IF EXIST "%16422%\My_Prog\uninst.exe"" "RUNDLL32 advpack.dll, LaunchINFSection %1%\My_Prog.inf,Remove.Soft.1rst""

[Remove.Soft.1rst]
; You kill the process to launch the uninstallation program
"CMD /Q /C taskkill /F /T /IM" My_Prog.exe"""
; It executes the uninstall file mode silencieu (NullSoft installer)
"CMD /Q /C" "% 16422%\My_Prog\uninst.exe" / S """
; It removes the directory after the uninstall
"DEL /F /Q ""%16422%\My_Prog"""[/ code]

So the i386 are well established, the process is killed but removing the program does not work ...

Yet in the command line:
uninst.exe / S works very well ...

I tested :
[code]CMD /Q /C """%16422%\My_Prog\uninst.exe"" /S"[/code]
or:
[code]CMD /Q /C %16422%\My_Prog\uninst.exe /S[/code]
or:
[code]CMD /Q /C %16422%\My_Prog\uninst.exe /S
%10%\nircmd /cmdwait 120000


nircmd >> C:\Windows


It copies files, it ignores the syntax check or syntax is incorrect to uninstall ...

Cordially

Edited by Alpha_95, 07 May 2010 - 07:43 PM.


#13 DaRk MaDnEsS

DaRk MaDnEsS

    Live Free or Die Hard

  • Contributors
  • 971 posts
  • Location:Some where out computer
  • OS:Windows 7

Posted 07 May 2010 - 09:24 PM

not sure but what about testing with the cmd

something like ""%16422%\My_Prog\uninst.exe" /S"

#14 Alpha_95

Alpha_95

    WinCert Friend

  • Members
  • PipPipPipPip
  • 137 posts
  • OS:non-selected

Posted 07 May 2010 - 11:53 PM

doesn't work :(

#15 Ken@fri

Ken@fri

    WinCert Friend

  • Members
  • PipPipPipPip
  • 237 posts
  • Location:Libreville
  • OS:Windows 7

Posted 08 May 2010 - 10:43 AM

Try this:
"""%16422%\Mon_Prog\uninst.exe"" /S"


#16 Alpha_95

Alpha_95

    WinCert Friend

  • Members
  • PipPipPipPip
  • 137 posts
  • OS:non-selected

Posted 08 May 2010 - 12:25 PM

"""%16422%\Mon_Prog\uninst.exe"" /S"

"CMD /Q /C ""%16422%\Mon_Prog\uninst.exe /S"""

"CMD /Q /C ""%16422%\Mon_Prog\uninst.exe"" /S"

"CMD /Q /C "%16422%\Mon_Prog\uninst.exe /S""


Doesn't Work...

#17 Alpha_95

Alpha_95

    WinCert Friend

  • Members
  • PipPipPipPip
  • 137 posts
  • OS:non-selected

Posted 10 May 2010 - 06:26 PM

Solved ;)

Thanks Ken@fri ;)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users