Well, obviously to get the script to compile I had to strip out the files
and just throw a few things from my machine into your structure.

But my message box before and after the shortcut creation does not have a
backslash.
But I still think I'm not understanding... you wrote "the value being
written is correct (never changed it"

Please spell out for an olde blonde exactly the name of the key and the
expected contents, and then what's actually being written / created instead.

Also... on a different matter... <<<<----
You are writing a bunch of Pervasive stuff to the registry.

I haven't worked with Pervasive... so maybe they have some tricks.
But normally, such writes will not work.
I can't create a new folder within HKLM when I use Regedit.
I can only create one within an existing folder, such as HKLM\SOFTWARE.

Try putting a message box to return %_SB_ERRORCODE% after one of those
registry writes you're attempting to HKLM\Pervasive Software. Is it, in
fact, being written?

Jane