Problem with shell instruction and path
markyT
Member Posts: 120
Hello, I've the followin code:
IF "Vendor No."='1999' THEN
SHELL('c:\windows\explorer.exe', '\\SERVER\Sales\\BMB');
This code is in OnPush from a commandbutton on Item label, and compares the vendor number and goes to a path from my network and opens a folder with several information from vendor. It's simply and runs perfectly.
The problem is, that, some users, works with terminal server sesions in a W2000 O.S., and, in Windows 2000, the path from shell command is winnt\explorer.exe, then, they can't open the folder because Navision doesn't find the windows folder. How can I do it to works in boths systems?.
Thanks in advance.
IF "Vendor No."='1999' THEN
SHELL('c:\windows\explorer.exe', '\\SERVER\Sales\\BMB');
This code is in OnPush from a commandbutton on Item label, and compares the vendor number and goes to a path from my network and opens a folder with several information from vendor. It's simply and runs perfectly.
The problem is, that, some users, works with terminal server sesions in a W2000 O.S., and, in Windows 2000, the path from shell command is winnt\explorer.exe, then, they can't open the folder because Navision doesn't find the windows folder. How can I do it to works in boths systems?.
Thanks in advance.
0
Comments
-
Hi,
You can use the ENVIRON function for that.
For instance create a local text variable called 'lv_win_path'.lv_win_path := ENVIRON('WINDIR'); if COPYSTR(lv_win_path,STRLEN(lv_win_path),1) <> '\' THEN lv_win_path := lv_win_path + '\';Then change your shell command to be:
SHELL(lv_win_path + 'explorer.exe', '\\SERVER\Sales\\BMB');
This should work.
Regards,
WillyFostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.0 -
Fantastic!! =D> , it runs perfectly. Thanks for your help and time.0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions