Navision Filepath

Big_D
Member Posts: 213
Hi Mibuso Community
Is there a way to know where Navision is running from, i.e., if run from C:\Navision\Fin.exe then I want to know that it was run from C:\Navision or if run from E:\Navision\Fin.exe then I want to know that it was run from E:\Navision?
Thanks for your help as always
!
Cheers
Is there a way to know where Navision is running from, i.e., if run from C:\Navision\Fin.exe then I want to know that it was run from C:\Navision or if run from E:\Navision\Fin.exe then I want to know that it was run from E:\Navision?
Thanks for your help as always

Cheers
Big D signing off!
0
Comments
-
if u use Nav >= 5.0
message(APPLICATIONPATH);
RegardsDo you make it right, it works too!0 -
ah forgott to post the solution, if you are us NAV <5.0
Name DataType Subtype Length WSHShell Automation 'Windows Script Host Object Model'.WshShell CREATE(WSHShell); MESSAGE('%1',WSHShell.CurrentDirectory);
regardsDo you make it right, it works too!0 -
Hi Garak
Thanks for the reply yes it was a 3.70 version I required. I found IWshShell3 in Windows Script Host Object Model - presumed it was one and the same for an XP m/c! What OLE do I need to register to run your lovely code?
Cheers and thanksBig D signing off!0 -
Hi Garak
Remembered that I have used that Automation ('Windows Script Host Object Model'.WshShell) for setting function keys and obtaining the windows currency so I just used your routine in the same codeunit and bingo - all works great thanks!
Never understood why Navision remembers a registration in one object but doesn't allow the same Automation routine in another new instance!
Cheers and thanks
DavidBig D signing off!0 -
Hi Garak
Am on a roll today - found wshom.ocx in C:\WINDOWS\system32\ and this had the actual WshShell which works in all objects now - hurrah!
ThanksBig D signing off!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions