Jump to content

Autoit Plugin Yardım


muratboy31
 Share

Recommended Posts

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;

 

14xjr88.png

 

 

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 by muratboy31
Link to comment
Share on other sites

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...

Link to comment
Share on other sites

  • Editor

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.

Link to comment
Share on other sites

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

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...