LOGIN  |  REGISTER
Smart Living Made Brilliant!
CASTLEOS FORUM

HomeCastleOS API

Information, FAQs, Q&As, and everything else related to the CastleOS API can be found here

Running cmd files from withing CS Messages in this topic - RSS

Elias Hall
Elias Hall
Posts: 34


5/4/2015
Elias Hall
Elias Hall
Posts: 34
I have created the following cs file to run but can't get the CMD file to execute, am I missing something?


using System;
using CastleOSKinectService;

public class MyScript
{
public void Main(string[] args)
{
ScriptingAPI.Speak("Good Night");
System.Diagnostics.Process.Start("C:\\SleepMode.cmd");
}
}
0 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390


5/4/2015
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390
You can't launch a program in the userspace directly from the script (Windows security precaution), not to fear however this is an easy workaround. Check out here: https://www.castleos.com/forum/topic385-remote-application-launcher.aspx
0 link