Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
Credits 1,513 Posts 554 Joined 2005-12-30 00:50 20-year member UID 48180 Gender Male
Status Offline
Done as requested by eech, but tracking the registry didn't work, so I had to switch to using the shortcut key method.
Oh, eech actually likes to delete ("remove") "Show Desktop.SCF" after installing the system, ^_^
I once wrote a small program for managing shortcuts that happens to have a function to repair Show Desktop.SCF:
If you mistakenly deleted "Show Desktop" in the Quick Launch bar, or "My Documents", "Mail Recipient", "Desktop Shortcut" in Send To, this program can repair them.
Now change it to automatically generate.SCF
'''DisktopIcon_AutoArrange.VBS by baomaboy Dim WshSHell,FSO OnErrorResumeNext Set WshSHell = WScript.CreateObject("WScript.Shell") Set FSO = CreateObject("Scripting.FileSystemObject") Set OF = FSO.OpenTextFile(FSO.BuildPath(FSO.GetSpecialFolder(1),"ShowDisktop.SCF"),2,True)
OF.Write(""&vbcrlf&"Command=2"&vbcrlf&"IconFile=explorer.exe,3"&vbcrlf&""&vbcrlf&"command=ToggleDesktop")
OF.Close if (WshShell.CurrentDirectory = WshShell.SpecialFolders("Desktop")) = "False"then
WshSHell.Run("ShowDisktop.SCF") endif
WScript.Sleep 500
WshSHell.SendKeys "{F5}+{F10}e"
WshSHell.SendKeys "+{F10}IA" Set WshSHell = Nothing Set FSO = Nothing
WScript.Quit
[ Last edited by baomaboy on 2008-3-24 at 10:19 PM ]
Credits 421 Posts 111 Joined 2003-08-29 00:00 22-year member UID 9153 Gender Male
Status Offline
I used it, it's completely normal. Can I use VBS to check/uncheck the "Microsoft Network File and Printer Sharing" option in the Local Area Connection?
Credits 1,513 Posts 554 Joined 2005-12-30 00:50 20-year member UID 48180 Gender Male
Status Offline
Originally posted by ronin at 2007-5-11 22:38:
I used it, it works completely. Can VBS be used to check/uncheck the option "Microsoft Network File and Printer Sharing" for the Local Area Connection?
Credits 906 Posts 346 Joined 2006-07-10 09:58 20-year member UID 58334 Gender Male
Status Offline
Originally posted by ronin at 2007-5-11 22:38:
I used it, it works perfectly. Can I use VBS to check/uncheck the option of "Microsoft Network File and Printer Sharing" in the Local Area Connection?
[ Last edited by ronin on 2007-5-11 at 10:42 PM ]
Dude, you're thinking what I'm thinking. You should ask baomaboy to write another one. Support you
Credits 906 Posts 346 Joined 2006-07-10 09:58 20-year member UID 58334 Gender Male
Status Offline
A suggestion, can you add {WIN+d} in the script, so that the script can take effect in any directory, currently the script only works when placed on the desktop
Credits 1,513 Posts 554 Joined 2005-12-30 00:50 20-year member UID 48180 Gender Male
Status Offline
Originally posted by eech at 2007-5-12 23:04:
A suggestion, can you add {WIN+d} in the script, so that the script can take effect in any directory.
Now the script only works when placed on the desktop
It was originally designed to not only run on the desktop. Why use so many lines if it can only run on the desktop?
WshSHell.Run(""""&ShowDisktop&"""") is replacing win+d.
If I could send the win key, I wouldn't use WshSHell.Run(""""&ShowDisktop&""""). The original post explained it. Up to now, I don't know how to send the win key. It can't be Ctrl+Esc, it's the Win combination key.
[ Last edited by baomaboy on 2007-5-12 at 11:59 PM ]
Credits 1,513 Posts 554 Joined 2005-12-30 00:50 20-year member UID 48180 Gender Male
Status Offline
Originally posted by ronin at 2007-5-11 22:38:
I used it, it works completely. Can VBS be used to check/uncheck the "Microsoft Network File and Printer Sharing" option in the local connection?
[ Last edited by ronin on 2007-5-11 at 10:42 PM ]
You can try running control Netcpl.cpl to open "Network Connections", but it doesn't open here.