恍惚之间

梦...

安装目录写入注册表(不知道有简单方法没..脑子不好使)

   Dim regist As RegistryKey = Registry.LocalMachine
        Dim reg As RegistryKey
        Dim regkey As String = "SOFTWARE"
        reg = regist.OpenSubKey(regkey, True)
        reg.CreateSubKey("TCKJ")                '创建项TCKJ

        regkey = "SOFTWARE\TCKJ"
        reg = regist.OpenSubKey(regkey, True)
        reg.CreateSubKey("SZJS")                '创建项SZJS

        regkey = "SOFTWARE\TCKJ\SZJS"
        reg = regist.OpenSubKey(regkey, True)   '创建字符串值 保存安装路径
        reg.SetValue("SetUpPath", Me.Context.Parameters.Item("targetdir"))

posted on 2006-11-23 20:47  Red Hu  阅读(...)  评论(...编辑  收藏

My Links

Blog Stats