schtasks turns ‘ into “

 schtasks /Create /TN "erorr" /TR "powershell -Command "Add-Type -AssemblyName PresentationFramework; [System.Windows.MessageBox]::Show('Fatal Script Error: Reference ID ''obj_04X5'' is undefined in game environment stack. Execution terminated.', 'Runtime Error', 0, 'Error')"" /RU lol /SC ONCE /ST 23:59 /F

should create this task:
powershell -Command “Add-Type -AssemblyName PresentationFramework; [System.Windows.MessageBox]::Show(‘Fatal Script Error: Reference ID ”obj_04X5” is undefined in game environment stack. Execution terminated.’, ‘Runtime Error’, 0, ‘Error’)”

but instead is creating this:
powershell -Command “Add-Type -AssemblyName PresentationFramework; [System.Windows.MessageBox]::Show(“Fatal Script Error: Reference ID “”obj_04X5″” is undefined in game environment stack. Execution terminated.”, “Runtime Error”, 0, “Error”)”

replacing ‘ into “