![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-09-25 01:20 |
47,813 topics / 349,918 posts / today 1 new / 48,274 members |
| DOS批处理 & 脚本技术(批处理室) » [Semi-original] System Enhancement VBS Tool Set |
| Printable Version 3,321 / 15 |
| Floor1 baomaboy | Posted 2007-01-28 13:26 |
| 银牌会员 Posts 554 Credits 1,513 | |
|
1.Antivirus software may report a virus. Please temporarily disable the real-time monitoring of the antivirus software when trying it out. I guarantee it's not a virus. Those who are afraid shouldn't download it.
2. I spent several nights and my head is big. I didn't test it carefully, but it's better to post it so that more people can test it. 3. Many ideas come from the SendTo+ of the helpless version master. Only after using SendTo+ did I plan to make a VBS collection. Packaged file of the system enhancement VBS tool set (209k): http://zhenlove.com.cn/cndos/fileup/files/LLKJ-PCOptimize.rar It's placed on the upload system since I'm too lazy to split volumes. |
|
| Floor2 electronixtar | Posted 2007-01-29 00:32 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
It's both an exe and encrypted, I really am fed up with U.
|
|
| Floor3 baomaboy | Posted 2007-01-29 00:43 |
| 银牌会员 Posts 554 Credits 1,513 | |
|
I'm really sorry.
EXE is a self-extracting file of RAR. I'm a super lazy person and always want to do it once and for all. I didn't want to go through my files one by one, so I made a RAR self-extracting installation. Hehe, when I made it, I only considered my own convenience and didn't know it would hurt everyone's feelings. But EXE is not a problem. Just right-click to extract it. It's said to be encrypted, but actually it's just a facade. I haven't encountered that VBS can really encrypt... The encryption is because I wrote too much. This needs to create an object, and then another needs to set a new variable. So I took the code of each added object and variable as a template. Those who write new programs can directly copy the original code. Even if this program doesn't need this object or variable, and in order to be more user-friendly, a lot of error handling is used, and a lot of if...then are added casually. Hehe, the source code is a mess (I have low level, no way). I'm afraid of misleading rookies like me and also afraid that such an immature and possibly full of errors and omissions semi-finished product will spread, so I... Well... I think when the code is mature and can really play its due role, I will put the source code up... Alas....... Today I drank at the hundred-day banquet of a friend's child and got high. If you don't like it..... I'll still take it down and use it and test it myself..... [ Last edited by baomaboy on 2007-1-29 at 03:43 AM ] |
|
| Floor4 electronixtar | Posted 2007-01-29 04:55 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
Hehe, I suggest directly posting the core code so that everyone can discuss it easily. For example, the one for ejecting the CD-ROM that uses the eject method of mplayer.ocx
|
|
| Floor5 baomaboy | Posted 2007-01-29 05:25 |
| 银牌会员 Posts 554 Credits 1,513 | |
|
Hehe,
Right - click menu: ①Restart Windows Explorer For Each Process in GetObject("winmgmts:"). _ ExecQuery ("select * from Win32_Process where name='explorer.exe'") Process.terminate(0) Next ②Open the target folder of the shortcut LinkName = Args(0) Set Scut = WshSHell.CreateShortcut(linkname) Folder = """" & FSO.GetParentFolderName(Scut.TargetPath) & """" WshSHell.Run(Folder) ③Generate a folder with the current date Package = WScript.Arguments.Item(0) PkgName=FSO.GetBaseName(Package) PkgPath=FSO.GetParentFolderName(Package)MyDate=Date Set NewFile = FSO.CreateFolder(FSO.BuildPath(PkgPath ,MyDate)) ④Delete/create the right - click new menu file type WshSHell.RegDelete "HKCR\" & FileExName & "\ShellNew\" WshSHell.RegWrite "HKCR\" & FileExName & "\ShellNew\NullFile","","REG_SZ" ⑤Display hidden system files and extensions There is source code in this forum...... ⑥Add "Save as Text" to the browser's right - click menu There is source code in this forum...... ⑦Add a shortcut to any folder Set MyShortcut = WshSHell.CreateShortcut(FSO.BuildPath(LnkPathAll,PkgNameInput&".Lnk")) MyShortcut.TargetPath = (Package) MyShortcut.WorkingDirectory = (PkgPath) MyShortcut.IconLocation = (FSO.BuildPath(InsPath ,"Shell32.dll, ") & PkgIconInput-1) MyShortcut.Save ⑧Generate a folder with the same name Package = WScript.Arguments.Item(0) PkgName=FSO.GetBaseName(Package) PkgPath=FSO.GetParentFolderName(Package) Set NewFile = FSO.CreateFolder(FSO.BuildPath(PkgPath ,PkgName)) ⑨Generate a text file with the same name and append clipboard content ShortName=FSO.BuildPath(PkgPath ,PkgName&".txt") WshSHell.Run “Cmd winclip.exe -p >> ShortName” ⑩Set/unset the 'System' attribute of files/folders Set FA = FSO.GetFolder(Args(0)) Set FA = FSO.GetFile(Args(0)) If FA.attributes and 4 Then FA.attributes = FA.attributes - 4 Else FA.attributes = FA.attributes + 4 End If [ Last edited by baomaboy on 2007-1-29 at 06:34 AM ] |
|
| Floor6 baomaboy | Posted 2007-01-29 05:59 |
| 银牌会员 Posts 554 Credits 1,513 | |
|
Right-click menu:
①Clear system junk files There are source codes for this on the forum... p, I just used VBS to generate p. ②Delete shortcut words and arrows Delete arrows and words WshSHell.RegDelete "HKEY_CLASSES_ROOT\lnkfile\IsShortcut" WshSHell.RegDelete "HKEY_CLASSES_ROOT\piffile\IsShortcut" WshSHell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\link",0,"REG_DWORD" Restore arrows and words WshSHell.RegWrite "HKEY_CLASSES_ROOT\lnkfile\IsShortcut","","REG_SZ" WshSHell.RegWrite "HKEY_CLASSES_ROOT\piffile\IsShortcut","","REG_SZ" WshSHell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\link",1,"REG_DWORD" (In this sentence, 1 can probably be written as any value, as long as it is not 0) ③Shutdown management hotkey I don't need to write the parameters for ShutDown, What's useful is to traverse the shutdown plans in the task scheduler: Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colScheduledJobs = objWMIService.ExecQuery ("Select * from Win32_ScheduledJob") For Each objJob in colScheduledJobs RWID=objJob.JobID RWCmd=objJob.Command RWTime=objJob.StartTime RWCmd_SD = Left(RWCmd, 8) RWTime_Q=Right(RWTime, 3) RWTime_H=Mid(RWTime,9,2) RWTime_M=Mid(RWTime,11,2) RWTime_Q2=Mid(RWTime,22,1) next Just judge whether RWCmd=objJob.Command is ShutDown ④Open and close CD drive WaitTime=“5000“ Set WshShell= WScript.CreateObject("WScript.Shell") Set oWMP = CreateObject("WMPlayer.OCX.7" ) Set colCDROMs = oWMP.cdromCollection if colCDROMs.Count >= 1 then colCDROMs.Item(CStr(0)).Eject oWMP.close() End If WScript.Sleep CLng(WaitTime) Set colCDROMs = oWMP.cdromCollection if colCDROMs.Count >= 1 then colCDROMs.Item(CStr(0)).Eject oWMP.close() End If [ Last edited by baomaboy on 2007-1-29 at 06:35 AM ] |
|
| Floor7 baomaboy | Posted 2007-01-29 06:10 |
| 银牌会员 Posts 554 Credits 1,513 | |
|
Quick Access
①Quickly Open Calculator RegForm1="REG_SZ" RegPath7="HKEY_CLASSES_ROOT\Directory\shell\Calculator\" RegValue7="Open System Calculator" RegPath8="HKEY_CLASSES_ROOT\Directory\shell\Calculator\command\" RegValue8="calc.exe" WshSHell.RegWrite RegPath7,RegValue7,RegForm1 WshSHell.RegWrite RegPath8,RegValue8,RegForm1 ②Quickly Enter Command Prompt RegValue2="cmd.exe /k cd %1" RegValue4="cmd.exe /k" RegPath1="HKEY_CLASSES_ROOT\Folder\shell\CommandPrompt\" RegValue1="Enter Command Prompt" RegForm1="REG_SZ" RegPath2="HKEY_CLASSES_ROOT\Folder\shell\CommandPrompt\command\" RegPath3="HKEY_CLASSES_ROOT\*\shell\CommandPrompt\" RegPath4="HKEY_CLASSES_ROOT\*\shell\CommandPrompt\command\" WshSHell.RegWrite RegPath1,RegValue1,RegForm1 WshSHell.RegWrite RegPath2,RegValue2,RegForm1 WshSHell.RegWrite RegPath3,RegValue1,RegForm1 WshSHell.RegWrite RegPath4,RegValue4,RegForm1 ③Copy To/Move To RegPath1="HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AllFilesystemObjects\shellex\ContextMenuHandlers\Copy To\" RegValue1="{C2FBB630-2971-11D1-A18C-00C04FD75D13}" RegForm1="REG_SZ" RegPath2="HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AllFilesystemObjects\shellex\ContextMenuHandlers\Move To\" RegValue2="{C2FBB631-2971-11D1-A18C-00C04FD75D13}" WshSHell.RegWrite RegPath1,RegValue1,RegForm1 WshSHell.RegWrite RegPath2,RegValue2,RegForm1 ④Quickly Open Notepad RegPath7="HKEY_CLASSES_ROOT\Directory\shell\Notepad\" RegValue7="Open Notepad" RegPath8="HKEY_CLASSES_ROOT\Directory\shell\Notepad\command\" RegValue8="Notepad.exe" RegForm1="REG_SZ" WshSHell.RegWrite RegPath7,RegValue7,RegForm1 WshSHell.RegWrite RegPath8,RegValue8,RegForm1 ⑤Open Folder in New Window RegPath5="HKEY_CLASSES_ROOT\Directory\shell\Openw\" RegValue5="Open Folder in New Window" RegPath6="HKEY_CLASSES_ROOT\Directory\shell\Openw\command\" RegValue6="explorer.exe %1" RegForm1="REG_SZ" WshSHell.RegWrite RegPath5,RegValue5,RegForm1 WshSHell.RegWrite RegPath6,RegValue6,RegForm1 ⑥Register DLL File RegPath1="HKEY_CLASSES_ROOT\Dllfile\shell\RegActiveX\" RegValue1="Register Control (&R)" RegForm1="REG_SZ" RegPath2="HKEY_CLASSES_ROOT\Dllfile\shell\RegActiveX\command\" RegValue2="RegSvr32 "+chr(34)+"%1"+chr(34) RegPath3="HKEY_CLASSES_ROOT\Dllfile\shell\UnRegActiveX\" RegValue3="Unregister Control (&U)" RegPath4="HKEY_CLASSES_ROOT\Dllfile\shell\UnRegActiveX\command\" RegValue4="RegSvr32 /u "+chr(34)+"%1"+chr(34) RegPath5="HKEY_CLASSES_ROOT\ocxfile\shell\RegActiveX\" RegValue5="Register Control (&R)" RegPath6="HKEY_CLASSES_ROOT\ocxfile\shell\RegActiveX\command\" RegValue6="RegSvr32 "+chr(34)+"%1"+chr(34) RegPath7="HKEY_CLASSES_ROOT\ocxfile\shell\UnRegActiveX\" RegValue7="Unregister Control (&U)" RegPath8="HKEY_CLASSES_ROOT\ocxfile\shell\UnRegActiveX\command\" RegValue8="RegSvr32 /u "+chr(34)+"%1"+chr(34) WshSHell.RegWrite RegPath1,RegValue1,RegForm1 WshSHell.RegWrite RegPath2,RegValue2,RegForm1 WshSHell.RegWrite RegPath3,RegValue3,RegForm1 WshSHell.RegWrite RegPath4,RegValue4,RegForm1 WshSHell.RegWrite RegPath5,RegValue5,RegForm1 WshSHell.RegWrite RegPath6,RegValue6,RegForm1 WshSHell.RegWrite RegPath7,RegValue7,RegForm1 WshSHell.RegWrite RegPath8,RegValue8,RegForm1 |
|
| Floor8 baomaboy | Posted 2007-01-29 06:27 |
| 银牌会员 Posts 554 Credits 1,513 | |
|
Copy Path to Clipboard
①DLL Version Can't see the packaged content, I just registered it. ②Excel Version Set objXL = WScript.CreateObject("Excel.Application") objXL.CutCopyMode = False objXL.WorkBooks.Add objXL.Range("A1").Value = Args(0) objXL.Range("A1").Select objXL.Range("A1").copy The process is to create a background Excel process to build a workbook, pass the obtained value into cell A1, and then copy it to the clipboard. I only know this clumsy method. ③IE Version There is source code in this forum...... ④Notepad Version Set TempFile = FSO.CreateTextFile(FSO.BuildPath(TemFilePath ,TemFileName), True)'Randomly set a temporary path to create a text file TempFile.WriteLine(Args(0))‘Write the obtained value into the text file TempFile.Close WshSHell.Run ("Notepad.exe " & FSO.BuildPath(TemFilePath ,TemFileName))’Open this text file with Notepad WshSHell.Sendkeys "^{a}^{c}"‘Everyone knows the shortcuts for selecting all and copying, copied to the clipboard, WshSHell.Sendkeys "%FX"Send the key value to exit Notepad Still my clumsy method, but I can't do this operation with the background running Notepad, so it can only run in the foreground, and you will see the Notepad window flash. ⑤Winclip Version Using a third-party tool Winclip, ported from the sento+ of the helpless version master. Set TempFile = FSO.CreateTextFile(FSO.BuildPath(TemFilePath ,TemFileName), True) TempFile.WriteLine(Args(0)) TempFile.Close WshSHell.Run (FSO.BuildPath(OtherFilePath,OtherFileName) & " -c " & FSO.BuildPath(TemFilePath ,TemFileName)), vbHide The path in the code needs to be replaced with your own path! Supplement: This function in the sedto+ of the helpless version master can obtain multiple paths. If you directly drag multiple files to my file, you can also obtain multiple paths, but after adding to the registry through the right-click menu, it doesn't work, so you can only select one target each time... I don't know if changing the command for passing parameters in the registry can realize multi-parameter passing. If anyone knows, please let me know, thank you. [ Last edited by baomaboy on 2007-1-29 at 07:20 AM ] |
|
| Floor9 electronixtar | Posted 2007-01-29 06:31 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
This suggestion is to be changed to cd /d "%~f1" |
|
| Floor10 baomaboy | Posted 2007-01-29 06:47 |
| 银牌会员 Posts 554 Credits 1,513 | |
|
electronixtar Thanks
My basic p is not good, I don't understand what "cd /d "%~f1"" means, And although it can be used after I changed it, there is an extra sentence "The system cannot find the specified path" I don't know if I made a mistake in the parameters. I directly copied yours to replace it. |
|
| Floor11 eech | Posted 2007-01-29 12:05 |
| 高级用户 Posts 346 Credits 906 | |
|
Copy. My Kaspersky keeps alarming
|
|
| Floor12 electronixtar | Posted 2007-01-30 00:40 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
Originally posted by baomaboy at 2007-1-29 06:47: Oh? Maybe I was wrong, heh heh. Let's change it back to cd %1, heh heh. The meaning of the /d parameter in cd /d is "jump directly to that directory". But it seems that the function is the same in the right-click, heh heh |
|
| Floor13 kich | Posted 2007-01-30 09:02 |
| 中级用户 Posts 168 Credits 397 | |
|
VBS, okay, top!
Go download it first to study, then come out! (Internet café crowd) |
|
| Floor14 jmz573515 | Posted 2007-02-01 04:16 |
| 银牌会员 Posts 464 Credits 1,212 | |
|
Not bad, top.
Ask the landlord, what software was used to make this executable file? |
|
| Floor15 baomaboy | Posted 2007-02-01 08:38 |
| 银牌会员 Posts 554 Credits 1,513 | |
Originally posted by jmz573515 at 2007-2-1 04:16: Made with Winrar. You can directly open or extract it with Winrar by right-clicking, except that I modified the self-extracting module of Winrar |
|
| 1 2 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |