Hi,
I want to insert a string variable to my powershell script and then execute the powershell script.
I've tried following :
DDEWrite("PowerShell", "C:\netsim\GotoOpcBlock.PS1", "paramOpcAddress", "MAINRACK.R_SYSCON.B_NAME");
This seems to start the powershell but, a powershell window complains about "File cannot be loaded because running script is disabled on this system".
When I run Get-ExecutionPolicy the status is "RemoteSigned". I have also installed latest Windows Powershell. If I execute the powershell script from Windows Explorer the script runs fine and does what its supposed to do.
Parameter SECURITY-BlockExec is set to 0, Allow Exec = TRUE, Allow RPC = TRUE
I'm not sure DDEwrite is the right function to execute a powershell script, its the closes I have found so far.
Appreciate all inputs and guides on solving this.
Thanks
Regards
Rune