How would i close the file then ... I am writing a program to run different powerpoint show depending on the time of day. I want to be able to close 1.pps when its time for 2.pps to run. hope this makes sense!

if (time.Hour >= 9 && time.Hour < 12)
            {
               Process.Start(@"C:\1.pps");  
               
            }
           
            else if (time.Hour >= 12 && time.Hour < 15)
            {
               Process.Start(@"C:\2.pps");

The idea is to wrap a for loop around the if statment and get it to keep checking what the time is and run the correct pps

Recommended Answers

All 2 Replies

System.Diagnostics.Process proc = new System.Diagnostics.Process();

proc.StartInfo = new System.Diagnostics.ProcessStartInfo("asdf.exe");

proc.Start();
proc.Close();

Thanks alot!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.