LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Windows 7 system exec.vi Error 2: Memory Full

Solved!
Go to solution

Mike@SensorSwitch wrote:

Why would it work on the Windows XP computer and not the Windows 7?


Your PATH environment variables may not be the same. Have you checked?

0 Kudos
Message 11 of 20
(3,837 Views)

I have not check this.  How would I check the path variables?  Thanks

0 Kudos
Message 12 of 20
(3,830 Views)
Solution
Accepted by topic author Mike@SensorSwitch

Did you try Google? Right-click on My Computer, then select Properties. Go to the Advanced tab for Windows XP. For Windows 7 click on the Advanced system settings link. Then click on the Environment Variables button. This will list system environment variables and user-specific environment variables. The "Path" environment variable is in the system environment variables section.

0 Kudos
Message 13 of 20
(3,824 Views)

You can also open a command prompt and type

 

path

 

You can also try to run your command from this command prompt and confirm you get no errors.

0 Kudos
Message 14 of 20
(3,815 Views)

That worked.  I checked the PATH environment variables and they were not the same.  I added that path environment variable I needed and now it works!  Thanks for the help.

0 Kudos
Message 15 of 20
(3,808 Views)

Andrew, on a related note, the VI provided by NI: https://decibel.ni.com/content/docs/DOC-17862

to calculate the disk usage of a windows directory using the System Exec VI also fails with error 2.

This VI used to work, but no longer does.

I have tried hacking it with different syntax as suggested in that article you reference, but I can't get it to work.

Has something changed somewhere?

 

 

Brian Smith
Advanced Light Source
Lawrence Berkeley National Laboratory
0 Kudos
Message 16 of 20
(2,803 Views)

What LabVIEW bitness are you using? Since you don't specify any path for your DU file I assume you installed it in System32 (or SysWow64 on 64 Bit systems). As such it will only be visible by a 32 bit LabVIEW version. When running it in LabVIEW 64 bit SysWOW64 is not part of the directories that are normally searched by Windows when starting a process without full path.

 

So move your DU exe into another directory outside of System32 of SysWOW64 and extend the example to provide an additional path control connected to the "working directory" input of System Exec. Pass the directory where your DU exe is located to this path control.

Rolf Kalbermatter
My Blog
0 Kudos
Message 17 of 20
(2,787 Views)

I am running LabVIEW 32 bits.

I already tried wiring the working path input to the system exec call but it still throws error 2.

Why doesn't the standard error output show any error from Windows?

 

Brian Smith
Advanced Light Source
Lawrence Berkeley National Laboratory
0 Kudos
Message 18 of 20
(2,761 Views)

I just found the solution.

The command passed to the system exec VI must be "cmd /c du -v <dir>", so I submit that NI should change the

"Systernals DU File Directory.vi" which can be found at https://decibel.ni.com/content/docs/DOC-17862 to do this.

 

Brian Smith
Advanced Light Source
Lawrence Berkeley National Laboratory
0 Kudos
Message 19 of 20
(2,758 Views)

I had the same problem with Windows 10. Using cmd /c on front of executable I am calling for helped. Thank you !

Message 20 of 20
(2,708 Views)