mibuso.com

Microsoft Business Solutions online community
It is currently Sat May 25, 2013 9:27 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: How to get the path of the RoleTailored Client
PostPosted: Thu Jul 26, 2012 9:51 am 
Offline

Joined: Thu Jul 26, 2012 9:46 am
Posts: 2
Country: Germany (de)
Hi i know it's easy to get the path of the Classic Client with APPLICATIONPATH. But if you use this with RTC it returns the path of the Service-Tier. So how to get the path of the client?


Top
 Profile E-mail  
 
 Post subject: Re: How to get the path of the RoleTailored Client
PostPosted: Thu Jul 26, 2012 12:14 pm 
Offline

Joined: Mon Sep 08, 2008 10:25 am
Posts: 488
Location: Switzerland
Country: Switzerland (ch)
You need the installation path of your rtc client?

Maybe .net interop helps: http://msdn.microsoft.com/en-us/library/aa457089.aspx

Be sure to set Property RunOnClient of your DotNet variable "Assembly" to True.

Code: Select all
GetClientPath() : Text
EXIT(Path.GetDirectoryName(
  Assembly.GetExecutingAssembly().GetName().CodeBase
));


Variables:
Name DataType Subtype Length
Assembly DotNet System.Reflection.Assembly.'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Path DotNet System.IO.Path.'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

_________________
My Blog


Top
 Profile  
 
 Post subject: Re: How to get the path of the RoleTailored Client
PostPosted: Thu Jul 26, 2012 3:12 pm 
Offline

Joined: Thu Jul 26, 2012 9:46 am
Posts: 2
Country: Germany (de)
Thanks for your reply, that works well.

I was thinking about it a while and then I found my own working solution:

Variables
Name____DataType___Subtype_______Length
WSH_____Automation_'Windows Script Host Object Model'.WshShell
RegValues___Text____________________1024

Code
Code: Select all
CREATE(WSH,FALSE,TRUE); //create automation on client
RegValue := WSH.RegRead('HKEY_CLASSES_ROOT\DYNAMICSNAV\Shell\Open\Command\'); //find registrykey for navisionlink
RegValue := COPYSTR(RegValue,1,STRLEN(RegValue)-5); // delete "%1" from text
Exit(RegValue); // return path of the exe-file


Top
 Profile E-mail  
 
 Post subject: Re: How to get the path of the RoleTailored Client
PostPosted: Fri Jul 27, 2012 10:27 am 
Offline
Moderator
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Wed Jul 02, 2003 10:13 am
Posts: 7504
Location: Milan
Country: Italy (it)
[Topic moved from 'NAV Three Tier' forum to 'NAV/Navision Classic Client' forum]

_________________
Regards,Alain Krikilion
Use the SEARCH,Luke! || No PM,please use the forum. || May the <SOLVED>-attribute be in your title! || Read Forum Rules before making a posting


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: