lint_Status:=SHELL('REGSVR32 /S ' + '"' + DLLFILENAME + '"')
--------------------------- Microsoft Business Solutions-Navision --------------------------- The file name "REGSVR32 /S C:\PROGRAM FILES\COMMON FILES\Navision\NTimer.dll" contains a character that may not be used. Please check the file name. You can find additional information on file names in the documentation for your operating system. --------------------------- OK ---------------------------Same error when I want to create a folder.
--------------------------- Microsoft Business Solutions-Navision --------------------------- The file name "MD C:\PROGRAM FILES\COMMON FILES\Navision" contains a character that may not be used. Please check the file name. You can find additional information on file names in the documentation for your operating system. --------------------------- OK ---------------------------But, both command above can run perfectly well in bat file.
Answers
SHELL('c:\windows\SYSTEM32\REGSVR32.exe',' /S' + '"' + dllfilename + '"')
Have any idea for the create folder?
Peter Ng
SHELL('c:\windows\system32\cmd.exe','/C mkdir C:\Test');
That is nice! Using (very) old ms-dos commands to make directories in Navision :shock:
Well, if it works it's ok I guess
Thanks.
Peter Ng
Bad programming
Although thanks for the sollutions this code seems to work on networkpaths as well and the createfolder of the FileSystemObject does not.
Although here is my improvement. Some people install windows on a different path or drive.
This code may be sloppy, I wrote it when I first was learning NAV years ago but it works.
'\\servername\folder\folder2\folder3\something.txt'
It will make sure
\\servername\folder\folder2\folder3\ is there, if not create the necc. folders, same with 'c:\test\test2\test.txt'
"Profanity is the one language all programmers know best."
Today i noticed the shell command had serious disadvantages and your code helped me out!.
-Lavin
"Profanity is the one language all programmers know best."