radyofon Posted June 21, 2013 Share Posted June 21, 2013 (edited) Internetten bulduğum aşağıdaki script normalde bat dosyası haline getirilip çalışmasına rağmen AMS'de bir butona atadığımda çalışmıyor ve kilitleniyor. java_uninstall bat dosyası --------------------------------- @ECHOOFF cls TITLE Uninstalling Java 6... (x86 and x64 versions) wmic product where "name like 'Java(TM) 6%%'" call uninstall /nointeractive goto END :END pause exit AMS Kodları ---------------- if System.Is64BitOS() then Wow64.DisableFsRedirection(); end File.Run("AutoPlay\\Docs\\java_uninstall.bat", "", "", SW_HIDE, true) File.Run("AutoPlay\\Docs\\jre-7u25-windows-i586.exe", "/s /v /qn", "", SW_SHOWNORMAL, true); if System.Is64BitOS() then Wow64.RevertFsRedirection(); end Edited June 21, 2013 by radyofon Quote Link to comment Share on other sites More sharing options...
radyofon Posted June 21, 2013 Author Share Posted June 21, 2013 SW_HIDE kısmını kaldırarak işi hallettim. Sadece bir kere Enter' a basmak gerekiyor. Enter tuşuna basmak istememiştim. Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted June 21, 2013 Share Posted June 21, 2013 $strComputer = "." $objShell = ObjCreate("WScript.Shell") $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & $strComputer & "\root\cimv2") $colSoftware = $objWMIService.ExecQuery ("Select * from Win32_Product where Caption LIKE '%Java%'") For $objSoftware In $colSoftware $String = "Description: " & $objSoftware.Description & @LF & _ "IdentifyingNumber: " & $objSoftware.IdentifyingNumber & @LF & _ "InstallDate: " & $objSoftware.InstallDate & @LF & _ "InstallDate2: " & $objSoftware.InstallDate2 & @LF & _ "InstallLocation: " & $objSoftware.InstallLocation & @LF & _ "InstallState: " & $objSoftware.InstallState & @LF & _ "Name: " & $objSoftware.Name & @LF & _ "PackageCache: " & $objSoftware.PackageCache & @LF & _ "SKUNumber: " & $objSoftware.SKUNumber & @LF & _ "Vendor: " & $objSoftware.Vendor & @LF & _ "Version: " & $objSoftware.Version MsgBox(0, $objSoftware.Caption, $String) ;~ $objShell.Run("msiexec /x " & $objSoftware.IdentifyingNumber & " /qn /norestart"),10,True Next autoit ile bu şekil Quote Link to comment Share on other sites More sharing options...
KintaRo Posted June 21, 2013 Share Posted June 21, 2013 pause komutunu kaldırırsan entera basmana gerek kalmaz 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.