Yea, that would work because the index needs to stay 0.I just figured out the problem, the delprinterconnection() function is actually removing the subkeys that I am trying to read (from within the loop). So, the index needs to stay at zero the whole time to always get the first subkey. I then will remove that printer connection and there will be one less subkey in the list. I may not be explaining this the best way but it works.
So, what I did to get it to work is to get rid of $index_one from the script all together. I now just put 0 in the enumkey() function.
Next thing I want to do is get rid of storing which printers the script installs in the HKLM registry. I would like to put an ini file on a public share that the script can read. This way if we change printers for a certain classroom, we will only have to change it in one place.
Back to work....
Thanks for the input!
[This message has been edited by path (edited 16 February 2001).]