中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

reg2vbs.vbs如何將Reg文件轉換為VBS文件保存

發布時間:2021-10-12 18:33:00 來源:億速云 閱讀:131 作者:小新 欄目:開發技術

這篇文章給大家分享的是有關reg2vbs.vbs如何將Reg文件轉換為VBS文件保存的內容。小編覺得挺實用的,因此分享給大家做個參考,一起跟隨小編過來看看吧。

復制代碼 代碼如下:


'*****************************************************************************
' FileName: Reg2Vbs.VBS
' Abstract: 將Reg文件轉換為VBS文件保存
'*****************************************************************************
Dim WshShell,FSO
On Error Resume Next
Set WshSHell = WScript.CreateObject("WScript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Args = WScript.Arguments
CloseTime = 5
FileName = WScript.ScriptName
FileFullName = WScript.ScriptFullName
FilePath = FSO.GetParentFolderName(FileFullName)
InsPath = FSO.GetSpecialFolder(1)
InsFullName = FSO.BuildPath(InsPath ,FileName)
Copyright="玲瓏科技"
QQ="QQ:25926183"
Email="Email:[email=25926183@qq.com]25926183@qq.com[/email]"
InsTitle="Reg2Vbs-Txt"
InsAnswer="Reg2Vbs-Txt"
RegPath2="HKEY_CLASSES_ROOT\regfile\shell\RegToVbs\"
RegValue1="REG轉VBS腳本文件"
RegForm1="REG_SZ"
RegPath3="HKEY_CLASSES_ROOT\regfile\shell\RegToVbs\command\"
RegValue2="wscript.exe """& InsFullName &""" ""%L"""
RegForm2="REG_SZ"
IF FileFullName <> InsFullName then
intAnswer = MsgBox("【是】將“"+ InsAnswer +"”加入到右鍵菜單,"&Chr(10)&Chr(10)&"【否】將“"+ InsAnswer +"”從右鍵菜單刪除。 ", vbQuestion + vbYesNoCancel, "安裝 - "+ InsTitle +" - by baomaboy")
If intAnswer = vbYes Then
WshSHell.RegWrite RegPath2,RegValue1,RegForm1
WshSHell.RegWrite RegPath3,RegValue2,RegForm2
FSO.GetFile(FileFullName).Copy(InsFullName)
WshSHell.popup _
"添加腳本文件:"+chr(10)+InsFullName+chr(10)+chr(10)+ _
"添加注冊表項:"+chr(10)+chr(34)+ RegPath2 +chr(34)+chr(10)+ _
chr(10) & CloseTime & " 秒鐘后本窗口將自動關閉!" +chr(10)+chr(10)+ _
chr(10) & "Copyright(C) " + Copyright +" " & QQ &" " + Email _
, CloseTime, "安裝成功 - "+ InsTitle +" - by baomaboy", 0 + 64
end if
If intAnswer = vbNo Then
WshSHell.RegDelete RegPath3
WshSHell.RegDelete RegPath2
FSO.DeleteFile InsFullName
WshSHell.popup _
"刪除腳本文件:"+chr(10)+InsFullName+chr(10)+chr(10)+ _
"刪除注冊表項:"+chr(10)+chr(34)+ RegPath2 +chr(34)+chr(10)+ _
chr(10) & CloseTime & " 秒鐘后本窗口將自動關閉!" +chr(10)+chr(10)+ _
chr(10) & "Copyright(C) " + Copyright +" " & QQ &" " + Email _
, CloseTime, "卸載成功 - "+ InsTitle +" - by baomaboy", 0 + 64
end if
If intAnswer = vbCancel Then
end if
ELSE
if Args.count=0 then wscript.quit
Set ReadFile = FSO.OpenTextFile(Args(0), 1,false,-1)
ReadAllText = ReadFile.ReadAll
ReadFile.Close
if mid(ReadAllText,1,3) <> "Win" and mid(ReadAllText,1,3) <> "REG" then
Set ReadFile = FSO.OpenTextFile(Args(0), 1)
ReadAllText = ReadFile.ReadAll
ReadFile.Close
end if
For i=1 To Len(ReadAllText)
TempNum = Asc(Mid(ReadAllText,i,1))
if TempNum = 34 Then
TempNum = 18
elseIf TempNum = 13 Then
TempNum = 28
ElseIf TempNum = 10 Then
TempNum = 29
end if
ThisText1 = ThisText1 & chr(TempNum)
Next
Set WriteFile = FSO.OpenTextFile(Args(0)&".VBS",2,True)
WriteFile.WriteLine("On Error Resume Next : Dim WshSHell,FSO,Reg2Vbs:Set WshSHell = WScript.CreateObject(""WScript.Shell""):Set FSO = CreateObject(""Scripting.FileSystemObject""):Reg2Vbs="""& ThisText1 &"""")
WriteFile.WriteLine("Execute(""For i=1 To Len(Reg2Vbs)""&vbCrLf&""TempNum = Asc(Mid(Reg2Vbs,i,1))""&vbCrLf&""If TempNum = 28 Then""&vbCrLf&""TempNum = 13""&vbCrLf&""ElseIf TempNum = 29 Then""&vbCrLf&""TempNum = 10""&vbCrLf&""elseif TempNum=18 Then""&vbCrLf&""TempNum = 34""&vbCrLf&""End If""&vbCrLf&""ThisText2 = ThisText2 & chr(TempNum)""&vbCrLf&""Next"")")
WriteFile.WriteLine("Set RegFile = FSO.OpenTextFile(FSO.BuildPath(FSO.GetSpecialFolder(2),""Temp.reg""),2,True):RegFile.WriteLine(ThisText2):RegFile.Close:WshSHell.Run(""regedit /s ""&FSO.BuildPath(FSO.GetSpecialFolder(2),""Temp.reg"")):WScript.Sleep 500:FSO.DeleteFile FSO.BuildPath(FSO.GetSpecialFolder(2),""Temp.reg"")")
WriteFile.Close
end if
Set WshSHell = Nothing
Set FSO = Nothing
Set Args = Nothing
WScript.Quit(0)

感謝各位的閱讀!關于“reg2vbs.vbs如何將Reg文件轉換為VBS文件保存”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,讓大家可以學到更多知識,如果覺得文章不錯,可以把它分享出去讓更多的人看到吧!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

vbs
AI

松滋市| 罗田县| 郴州市| 微博| 应用必备| 元氏县| 双峰县| 卓资县| 安宁市| 扬中市| 沙坪坝区| 佛学| 顺昌县| 永善县| 留坝县| 和林格尔县| 四川省| 资中县| 察雅县| 高邑县| 凉城县| 南开区| 郴州市| 平顶山市| 名山县| 桃源县| 耒阳市| 都匀市| 县级市| 志丹县| 济南市| 怀来县| 拉萨市| 丹江口市| 苏尼特左旗| 东山县| 马边| 东乡县| 保亭| 连江县| 钟山县|