Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: shell helper object application wscript
This object lets you manipulate the desktop and access other system operations.
Things you can do:
ShellApplication = ObjectOpen("Shell.Application")Windows 98, ME, 2000 and XP users should have no trouble with this object. If you have Windows 95 or NT 4 and installed IE 5 without upgrading from IE 4 then you may get an error when trying to use this object. If you have already installed IE 5 then try this command:
For NT
IE5Setup.exe /C:"ie5wzd /e:IE4Shell_NTx86 /I:Y"For 95
IE5Setup.exe /C:"ie5wzd /e:IE4Shell_WIN /I:Y"
Copy file
oSHApp = ObjectOpen("Shell.Application") source = "C:\temp\test.txt" target = "C:\temp2\" oNameSpace = oSHApp.Namespace(target) oNameSpace.CopyHere(source) ObjectClose(oNameSpace) ObjectClose(oSHApp)This script minimizes all open windows then opens a number of folders.
winddir = DirWindows(0) oWSHShell = ObjectOpen("WScript.Shell") oSHApp = ObjectOpen("Shell.Application") oSHApp.MinimizeAll oSHApp.Open("C:\") oSHApp.Open(winddir) ;oSHApp.Open("\\PDC\netlogon") oSHApp.TileVertically oWSHShell.popup("Restore Desktop") oSHApp.UndoMinimizeAll ObjectClose(oWSHShell) ObjectClose(oSHApp) ExitFor a list of shell objects and methods see:
oShell = ObjectOpen("Shell.Application") ;Minimizes all windows on the desktop ;oShell.MinimizeAll ;Displays the Run dialog box ;oShell.FileRun ;Displays the Shut Down Windows dialog box ;oShell.ShutdownWindows ;Displays the Find dialog box ;oShell.FindFiles ;Displays the Date/Time dialog box ;oShell.SetTime ;Runs a Control Panel application ;(Internet Properties dialog box) ;oShell.ControlPanelItem("INETCPL.cpl") ;Explores a folder ;oShell.Explore ("C:\YourFolder") ;Enables user to select folder ;returns a handle to wich you can apply methods ;handle=oShell.BrowseForFolder (0, "Text", 0, "C:\YourFolder") ;Opens a folder ;oShell.Open ("C:\YourFolder") ;Displays the Taskbar Properties dialog box ;oShell.TrayProperties ObjectClose(oShell)
Article ID: W15232
File Created: 2003:01:31:11:04:46
Last Updated: 2003:01:31:11:04:46