⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stafdeleteregistry2x.java

📁 Software Testing Automation Framework (STAF)的开发代码
💻 JAVA
字号:
/*****************************************************************************//* Software Testing Automation Framework (STAF)                              *//* (C) Copyright IBM Corp. 2004, 2005                                        *//*                                                                           *//* This software is licensed under the Common Public License (CPL) V1.0.     *//*****************************************************************************/import com.installshield.wizard.*;import com.installshield.wizard.service.*;import com.installshield.util.*;import com.installshield.wizard.platform.win32.*;public class STAFDeleteRegistry2x extends WizardAction{          public void build(WizardBuilderSupport support)    {        support.putRequiredService(Win32RegistryService.NAME);    }    public void execute(WizardBeanEvent event)    {        try        {            Win32RegistryService wrs =                 (Win32RegistryService)getService(Win32RegistryService.NAME);                        String parentKey = "SOFTWARE\\IBM";              String stafKey = "STAF - Software Testing Automation Framework";            String versionKey = "2.6.6";                        boolean exists = wrs.keyExists(                GenericWin32RegistryService.HKEY_LOCAL_MACHINE,                 parentKey + "\\" + stafKey + "\\" + versionKey);                                 if (exists)            {                wrs.deleteKey(GenericWin32RegistryService.HKEY_LOCAL_MACHINE,                              parentKey + "\\" + stafKey, versionKey, true);            }                        String subkeyNames[] = wrs.getSubkeyNames(                GenericWin32RegistryService.HKEY_LOCAL_MACHINE,                parentKey + "\\" + stafKey);                            if (subkeyNames.length == 0)            {                wrs.deleteKey(GenericWin32RegistryService.HKEY_LOCAL_MACHINE,                              parentKey, stafKey, true);            }        }        catch (ServiceException ex)        {            ex.printStackTrace();        }    }    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -