Jump to content

Kurulum Tamamlandığında Pc Reset Ve Kapatma


SAYGINER
 Share

Recommended Posts

Merhaba arkadaşlar yeni bir proje çalışması yapıyorum.Hemen herşey bitti sayılır.Fakat Kurulumlar yapıldıktan sonra bilgisayarı reset ve kapat CheckBox larını bir türlü yapamadım.Sitede birçok örnek var fakat örnekleri uygulayınca daha programlar kurulmadan bilgisayar resetliyor.Sayın KintaRo nun verdiği kodları denedim sonuç yine aynı.Seçtiğim kurulumlar bittikten sonra reset ya da kapat fonksiyonlarının çalışmasını nasıl sağlaya bilirim? Saygılar
[quote name='KintaRo' date='04 January 2010 - 12:20 ' timestamp='1262596857' post='684584']
Bilgisayarı Restart et: (20 sn. içinde bilgisayarı yeniden başlatır.)
[CODE]File.Run("shutdown.exe -r -f -t 20 -c Windows 20sn sonra yeniden başlayacaktır.", "", "", SW_SHOWNORMAL, true);[/CODE]

Bilgisayarı Restart et: (Direk yeniden başlatır)
[CODE]File.Run("shutdown.exe -r -f", "", "", SW_SHOWNORMAL, true);[/CODE]

Bilgisayarı Kapat:
[CODE]File.Run("shutdown.exe -s -f", "", "", SW_SHOWNORMAL, true);[/CODE]

Oturumu Kapat:
[CODE]File.Run("shutdown.exe -l -f", "", "", SW_SHOWNORMAL, true);[/CODE]
Link to comment
Share on other sites

Örnek olarak:

[spoiler][img]http://www.tnctr.com/uploads/imgs/pre_1339751091__sshot-4.png[/img][/spoiler]


[xml]
bReset = RadioButton.GetChecked("RadioButton3");
bKapat = RadioButton.GetChecked("RadioButton2");
bOKapat = RadioButton.GetChecked("RadioButton1");
if (bReset == false and bKapat == false and bOKapat == false) then
Dialog.Message("", "Lütfen seçim yapınız.")
elseif (bReset == true) then
Dialog.Message("", "Resetleme seçildi.")
elseif (bKapat == true) then
Dialog.Message("", "Kapatma seçildi.")
elseif (bOKapat == true) then
Dialog.Message("", "Otorumu Kapat seçildi.")
end[/xml]

Link to comment
Share on other sites

[quote name='Baba_' date='15 June 2012 - 21:26 ' timestamp='1339784813' post='1212378']
[b]Kodlarını görmeden nasıl bir çözüm bulmamızı bekliyorsun ? Bari bi proje dosyası paylaş da öyle bakalım.[/b]
[/quote]
bağlantı sorunum olduğu için şu an örnek bir dosya yükleyemedim.Yaptıklarımı yazmaya çalışayım.
[b]Kur[/b] butonunun On Click kodları
sifirla()
hepsinioku("4")
Page.StartTimer(100)
StatusDlg.Show(MB_ICONNONE, false);
StatusDlg.SetTitle("%0 kurulum tamamlandı..");
kurulum("CheckBox1", "PowerISO", "PowerISO.exe")
kurulum("CheckBox2", "Winamp", "winamp.exe")
kurulum("CheckBox3", "Ccleaner", "ccleaner.exe")
kurulum("CheckBox4", "AMS", "ams.exe")
StatusDlg.SetMessage("Kurulum Sonlandırılıyor..");
Application.Sleep(1000)
StatusDlg.Hide();
s1= CheckBox.GetChecked("CheckBox11");
s2= CheckBox.GetChecked("CheckBox9");
s3= CheckBox.GetChecked("CheckBox10");
s4= CheckBox.GetChecked("CheckBox8");
s5= CheckBox.GetChecked("CheckBox12");

[b]Kurulum Tamamlandığında [/b]CheckBox unun On Click kısmının kodları
if CheckBox.GetChecked(this) == false then
makeafterinstallation = 0
for i=1,4 do
RadioButton.SetEnabled("RadioButton"..i, false);
end
else
for i=1,4 do
RadioButton.SetEnabled("RadioButton"..i, true);
end
end
[b]Uygulamayı Sonlandır [/b]
RadioButton1 On click kısmına
makeafterinstallation = 1
[b]Bilgisayarı Yeniden Başlat [/b]
RadioButton2 On click kısmına
makeafterinstallation = 2
[b]Bilgisayarı Kapat[/b]
RadioButton3 On click kısmına
makeafterinstallation = 3
Okadar çok kod denedim ki bu kodları hangi arkadaştan aldığımı bile unuttum.Saygılar.

Link to comment
Share on other sites

[quote name='radyofon' date='16 June 2012 - 19:55 ' timestamp='1339865731' post='1212692']
Yazacağın kod:
[code]System.Reboot();[/code]
[/quote]
Teşekkürler.Ama RadioButton da bilgisayarı resetle seçilecek ve kurulacak programların bitiminde devreye otomatik olarak girecek.

Link to comment
Share on other sites

[color="#8B0000"]Sayın radyofon ;[/color]

[b]Bilgisayarı kapatma, yeniden başlatma vs. kodları zaten var. Arkadaş vermiş onları. Orda bi sıkıntı yok.[/b]

[color="#8B0000"]SAYGINER ;[/color]

[b]Projeyi indirdim, birazdan Camiye giderim, dönüşte sorunu hallederiz inşAllah.[/b]

Edited by Baba_
Link to comment
Share on other sites

Kur butonu sonuna eklenecek kodlar
[code]

run = Dialog.Message("Bilgi" "Bütün programlar kurulduysa devam etmek istiyor musunuz?", MB_YESNO, MB_ICONINFORMATION, MB_DEFBUTTON1);
if run == 6 then
kapat reset komutları buraya
end
[/code]

Edited by radyofon
Link to comment
Share on other sites

Arkadaşın bilgisayarında denedik.win 7 de çalıştı.Benim külüstür bilgisayarımda XP yüklü.XP den kaynaklanan ya da benim bilgisayardan kaynaklan bir hata mı var?Saygılar

Edited by SAYGINER
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...