Using your last code snipet...
1st, you've got some basics wrong.
In...
set id [pv wmconsole.exe]
set spawn_id $id
This is incorrect. The spawn_id is an Expect system variable that is automatically set each time a process is spawned. Thus to retain this id value to use later, you need to set your own variable to this value.
> set cmd1_id $spawn_id
Also, once you spawn a process you should include an "expect" cmd to explicitly wait for whatever is returned as a result of the spawned process. Usually it's sufficient to use the typical prompt (or some subset string of).
e.g. > expect "c:\blah>"
Then you can "send" anything you want to spawned process as if your where typing this directly from this prompt.
e.g. > send "dir\r"
AFTER each "send" cmd, you should again have some kind of "expect" cmd so that your 'next' cmd doesn't prematurely execute before the "send" cmd is executed (it's good practice - you could get undesirable results).
This sequence of cmds is what I referred to as the two combo-cmds: "expect" & "send".
Now, if you need to spawn another process while you’re in a spawned process, you can. Remember, that even though each spawn process creates a unique 'identifier' (i.e. - $spawn_id variable), by default the "send" and "expect" cmds communicate with the most recently spawned process.
However, in you case you really don't need to even retain the $spawnd_id of each process because you're really just nesting each spawn process and thus each subsequent "expect" and "send" cmd will be applied to most recent spawned process. Once you closeout the most recent spawned process (via a "send" cmd, e.g. - send "exit\r" – Note: you should use a subsequent “expect” cmd after the “send”), you'll be back at the previous process spawned. Saving the $spawn_id value is useful and used when you want to communicate to each ‘interactive’ spawned process regardless of when you initially spawned the process (using the -i, flag, e.g. send -i $cmd1_id "blah\r").
I suggest you 1st test multiple spawned processes and subseqeuntly talking to each one (i.e. - using the "expect" & "send" cmds) using a simple interactive program like cmd.exe. Spawn a cmd.exe program, run some simple commands on this process, then from this process spawn a 2nd cmd.exe process and run some more commands. Basically your program should mimic what you could do if you did this manually.
Hope this helps ...