You probably don't have VI scripting enabled in the labview enviornment. do a quick google search and it should tell you how to do it depending on the version of labview you are using (it requires a download pre 2010 i believe)
a couple of pointers for your script, load all the VI references first before modifying. sometimes save dialogs will come up if you do not do it this way as they enter/leave memory. I would modifiy the code to do the following:
one for loop to load the VIs (get the VI reference)
one for loop to modify (disconnect from library, then test if it is a control, if it is, set it to standard control)
one for loop to save them all to a new path.
one more for loop to simple "save" them (do not put in a path)
you have to double save because you are moving subVI dependencies and that is important to the loaded VIs. So even though you are saving the VI you modified, you have to resave to account for repathing.
Do not save copies. The references will get all out of whack with cross links if you try to load your new copy VIs. just backup your work first in case something gets hosed.
one more thing, when you get all dependencies in the library, feed it the constant string "VI"
you don't have to for this particular .lvlib since there are only VIs in it, but if there was a virtual folder or something else it would break your script.
~Jon
I'd modify it for you but I can't upload code right now. Its probably better in the long run that you learn to do it anyway.
~Jon