10-14-2024 01:49 PM - edited 10-14-2024 01:50 PM
Hi guys,
I am trying to place my VI in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
I am able to successfully place it in that folder, however when I open the VI, it asks me to show it where the subVIs are located. (The VI was previously in 'Documents' and i can open it fine without it asking where the subVIs are)
So after telling it where the subVIs are (they have not moved..) I am unable to save it, so the file remembers where the subVIs are. This means when I restart the laptop, and it opens up on windows launch, it fails to run because its wondering where the files are.
Not sure how to get around it? I was thinking of running the VI as administrator, but that is not an option on windows, it must not see the VI as an application
EDIT: Ok i figured it out but thought I would post anyway incase someone googles in future, I ran labview as administrator (not the VI itself) then opened the VI via labview, and then I could save it.
10-14-2024 02:25 PM
I would suggest you create an executable to run at startup, rather than a LabVIEW VI. That will keep things self-contained, and it won't worry about paths to other VI's.
I think you could also just run that VI itself as Admin to update the paths, rather than running LabVIEW as admin. Either works of course.
10-15-2024 01:57 AM
I'm guessing you just moved the VI to that folder. Most subVI paths are saved as relative path, so if you move the VI outside of LV, it looks for the subVIs in the wrong place.
Other than the suggestion to use an EXE, I would also suggest that whichever way you go, don't put actual files in the Startup folder. Instead, create a shortcut to the file. This should work whether it's a VI or an EXE and then you would probably not have seen the problem, because the VI would have stayed in its original location.