//修复开发环境

/*
作者:wjz
http://www.ecranesoft.com/bbs/showtopic-10067.aspx
*/
import win.reg;
import win.ui;
/*DSG{{*/
var winform = win.form(parent=...; text="AAuto Form";right=293;bottom=140 )
winform.add( 
button={ bottom=99;text="清理快手注册表
修复重置开发环境";left=44;top=48;font=LOGFONT( name="SimSun";h=-12 );z=1;right=256;cls="button" };
static2={ right=265;bottom=38;text="请编译后运行，运行以前关闭快手开发环境";left=18;top=18;z=2;transparent=1;cls="static" }
)
/*}}*/

winform.button.oncommand = function(id,event){ 

    reg = win.reg("HKEY_CURRENT_USER\Software\ECranesoft")
    reg.enumKey(
        function(reg,keyname){
            reg.delKey(keyname)
        }
    )
    reg.close();
    
    reg = win.reg("HKEY_CURRENT_USER\Software") 
    reg.delKey("ECranesoft")
    reg.close();
    
    winform.close()
}
winform.show() 
win.loopMessage(); 
