Running a powershell script through c#
===

I have a couple of problems.  here's how it works.  on a windows form, the user clicks the button.  the button executes a cmd script and in turn the cmd script executes a powershell script.  

why the cmd script you ask?  well, if I have a click of the button run a powershell script I have problems with signing.  

At the beginning of the powershell script I set the execution policy to unrestricted.  if i run the script through powershell directly, this changes the execution policy perfectly fine and the script works.  if i have the user click the button to run the powershell script, it says I have problems with signing, even though the execution policy did get set to unrestricted!  ridiculous.  I found that setting the execution policy within the cmd script fixed this and that is how i run my powershell scripts at the click of a button.  whatever, it was a work around and it works.

my problem now is I have a cmd script that calls a powershell script to change a registry key.  this is done yet again by the click of a button.  it looks fine, everything seems to work, but the value of the key does not get changed.  now, if I simply run the cmd script without my windows form application, the value of the key does change.  why is this so?