link: navision://client/run... 3.7 2 4.0 Conflict

MarcelWMarcelW Member Posts: 46
Hello,

I wanted to create a link to a navision 3.7 database. the result was a link like:

[url=navision://client/run?database=path2DB]navision://client/run?database=path2DB[/url] company=comanyname target=FormID view=SORTING(Field1) position=Field1=0(76) servertype=NAVISION

But i have installed a newer 4.0 navision client, too. And the link starts the last installed 4.0 client instead of the 3.7 client.

How can i dirctly start the 3.7 client by this link?

Thanks, Marcel

Comments

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    I don;t think it is possible, because it is using the last installed navision version.

    But if you get this working! Inform me because I also want this to work...
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    The path to finhlink.exe is retrieved from this key in the registry:
    [HKEY_CLASSES_ROOT\navision\shell\open\command]

    So you need to change this path to your 3.70 finhlink.exe version, using regedit.

    If you want to use these shortcuts both for 3.70 & 4.0, on the same computer, you'll need to write some script to:
    1. Change the registry-key to the correct Navision version
    2. Execute your link
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Thanks Luc.

    A was affraid the answer was something like that. :|

    You don;t happen to have some example of the script do you? O:)
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    [...]
    You don;t happen to have some example of the script do you? O:)

    No, I don't have an example right away. I leave this as an exercise for the experienced reader ;-)
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Here is the script.

    In order to get this to work:
    1. Replace "d:\appl\MBS-NavisionW170A\finhlink.exe" with the correct path to finhlink.exe
    2. Replace "shortcut.url" with the name of your shortcut (created by Navision)
    3. Save this code as runlink.vbs.
    dim WShell
    set WShell = Wscript.CreateObject("Wscript.Shell")
    WShell.RegWrite "HKEY_CLASSES_ROOT\navision\shell\open\command\","d:\appl\MBS-NavisionW170A\finhlink.exe ""%1""","REG_SZ"
    WShell.Run "shortcut.url",1,0
    Set WShell = Nothing
    

    When you run the script runlink.vbs, the registry-key will be changed and the shortcut url started.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • MarcelWMarcelW Member Posts: 46
    Thank u very much.

    I think this i all i need to solve my problem.
    Maybe i write a programm for an easier way to
    change the registry.

    Bye, Marcel
Sign In or Register to comment.