Jump to content

Java Uninstall


radyofon
 Share

Recommended Posts

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

$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

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