LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error with specfile. 1.Bad Key: [Directories] NIDIR

While running this code from a command line,(and test_spec.txt resides in the same root)
setup.exe test_spec.txt /r:n

I get this error during initialization,
"The following sections are missing from the specfile:
1. Bad Key: [Directories] NIDIR
Please correct the specfile and try again"


Hopefully this is just a syntax problem I am having. But I am using a specfile from the template that came with the media. Here is the section from my test_spec.txt file.

[Directories]
NIDIR=C:\Program Files\National Instruments

I have tried enclosing in quotes, adding spaces around "=" sign, etc. and I get the same error.

Anyone have a working example, or any ideas?

Thanks in advance,
DR
0 Kudos
Message 1 of 4
(3,007 Views)
Hi BV,

Is it possible that the space between "Program" and "Files" or between "National" and "Instruments" is causing the troubles? What happens if you put quotations around the whole path? What happens if you put test_spec.txt directly in the C directory and test:

NIDIR=C:\

This is simply a test, but I'm curious if this would make a difference.
Travis H.
LabVIEW R&D
National Instruments
0 Kudos
Message 2 of 4
(2,980 Views)
I could not get it to work with quotes around the path, seperate folders or the entire string. NIDIR=C:\ did not work either.

I finally got it to work by commenting out the NIDIR in the specfile.txt, which installs in the default directory.
---
Something strange that I found however.
There is different syntax available when calling setup.exe, depending on how you call it.

From a cmd line type, setup.exe /? your get a message box with the available SETUP syntax options.

Then run setup.exe /? from within a simple batch file and you get a message box with the avaiable USAGE syntax options.
---
MY users will want specific components installed besides the defaults.
Does anyone have working code for using the setup.ini or setup.inf silent install options?

Thanks in advance,
DR
0 Kudos
Message 3 of 4
(2,972 Views)
We actually found the solution to this issue thought NI Support.

First, the NIDIR key is, in fact, bad. You must use instead as such:

[Directories]
=C:\Your Path\For Installation\No Quotes Required

Then, the specfile MUST be located in the supportfiles directory, which should be next to the setup.exe, for the silent installation to work correctly.

Try that, it worked with us.
0 Kudos
Message 4 of 4
(2,923 Views)