The code above does what you want, after you reset it to 2006. (I see your on 06 from your path)
The IF checks to see what your path is, and toggles it to the other path. I cant be sure the crashing was folder related, however, it happened at the very moment I tried to check the function. I dont have a "X" drive mapped, so in the first example, I think that was what crashed it. Then, since that is written to the registry, every time I tried to open AutoCAD, it looked for the X drive, and crashed. To fix this, I just edited my registry to reset to my C drive, and autocad opened right away.
As for not creating the folder, if you put the folder on a "KNOWN" mapped drive that everyone has, it wouldn't crash. Also, a user shouldn't run the code if they aren't using the folder local or otherwise.