muratboy31 Posted August 13, 2013 Share Posted August 13, 2013 (edited) Domainde bulunan bir pc de domain kullanıcısı ile ufak bir bat dosyası çalıştırmam lazım local admin yetkisi ile bu kodu denedim ama aşağıdaki hatayı verdi; kullandığım kod bu : lan_info=System.GetLANInfo(); strHost=lan_info.Host; if File.DoesExist("C:\\start.bat") == true then AutoIt.RunAsSet("User", strHost, "Pass", 1) AutoIt.RunWait("C:\\start.bat", "", AUTOIT_SW_SHOWNORMAL) AutoIt.RunAsSet("", "", "", 1) else Dialog.Message("Uyarı", "Dosya bulunamadı !!!", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); end EDIT: Runwait(@ComSpec & " /K " & @ScriptDir & "Start.bat", @ScriptDir & "data", @SW_SHOW) böyle birşey buldum ama bunu ams de nasıl kullanabilirim ? yada bu çalışır mı sizce ? Edited August 13, 2013 by muratboy31 Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted August 13, 2013 Editor Share Posted August 13, 2013 File.Run ile yapabilirsin autoit pluginine gerek yokki Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted August 13, 2013 Author Share Posted August 13, 2013 Ama ben domain kullanıcısı ile açıyorum kullanıcıların pc sini ve admin yetkisi olmadan güncellemeleri almıyor netten, normalde runas komutu ile yapabilirim ama bazen sıkıntı oluyor kısayolarla alakalı... o yüzden file.run çalışmaz diye tahmin ediyorum... Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted August 13, 2013 Editor Share Posted August 13, 2013 result = File.RunAs("AutoPlay\\Docs\\MyProg.exe", "", "", SW_SHOWNORMAL, false, "username", "password", "domain", LOGON_NO_OPTION, nil, nil); Programınıda admin yetkisiyle çalıştırt. Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted August 13, 2013 Author Share Posted August 13, 2013 Hayır bunu denedim olmuyor, lan_info=System.GetLANInfo(); strHost=lan_info.Host; File.RunAs("C:\\start.bat", "", "", SW_SHOWNORMAL, false, "user", "pass", strHost, LOGON_NO_OPTION, nil, nil); yalnız şöyle birşey var ; bat dosyası bir java dosyası çalıştırıyor onun için sanırım shellexecute kullanmak gerekir yanlışmıyım ? şifre ve kullanıcı olayını shell execute ile nasıl yaparım Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.