I have the following problem:
I want to use the CMD from NAV to execute the SET HOMDRIVE function. The return value, i.e. the path, should be stored as a variable in NAV.
This is the code:
HomeDriveL := WshShell.Run('SET HOMEDRIVE');
HomeDriveL is a local variable and is from DataType a Text.
But when executing in NAV I get this error:
Error when calling System.__ComObject.Run with the following message: The system cannot find the specified file. (Exception of HRESULT: 0x80070002)
Can someone help me with that?
Many thanks in advance!