03-05-2013 11:50 PM
I know this is a shockingly open question but can anyone provide an example of how to make this work?
I've been trying to wade through the help files and Google to build a working code snippet where I can specify a folder as a string and have windows share it but for the life of me I can't make any headway into getting it working.
Basically the app I'm writing needs to ensure a folder is shared, transfer a file across the network to the locally shared folder and then disable the share.
I've got the app generating the path structures OK and grabbing the file from the network share when I turn it on manually but getting the share turned on in the first place is just too much for my brain I fear.
I think this one is a step too far for me at my present stage of development into LabView programming 🙂
Thank you very much for any assistance you can give.
Cheers guys.
03-06-2013 03:01 PM
Hi WhtKnight
Would you have administrator’s privileges in both computers?
Do you know which command that does this? Because if it is part of the windows dll library you should try to find a manual for the windows dll in order to find that command or function.
Could you attach your code or VI snippet to this forum? And also the functions of the dll that you are using in order to have them as a reference in case I am not able to run you code.
Regards
Esteban R.
03-06-2013 06:13 PM
I believe the functions I'm trying to implement are NetShareAdd and NetShareDel. As for the admin rights, yes, I will have them for both systems 🙂
I've attached the two Sub VIs i'll be using with this new one...
The Spectrum Analyser Config VI tells the unit to create a new state file and save it to the folder specified.
The Path Conversion VI is used to pull the IP address of the machine the software is being run from and create a network path to the folder passed to it.
The main aim of these two Sub VIs was to take the working directory from the main app and allow the Specan to save the config file there. That was when i realised I needed the directory to be shared for the Specan to write into.
If I manually share the folder it works fine so If we can work out how to throw this Folder Sharing VI together I'd be stoked 🙂
Thanks for the help
Steve
03-06-2013 06:53 PM
Can you keep the folder shared with an access password?
Or, if you have internet toolkit, try ftp.
03-06-2013 09:53 PM
Not really, this app will end up being run on various laptops on site which won't be configured for the test application...
I know it sounds stupid but I need it to be independent of the user so that all they have to do is run the app and it takes care of the configuration and all they get to see is the result 🙂
03-07-2013 10:39 AM
You can hardcode the username/password in the code.
You user won't notice the difference.