WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

OLE COM ADO CDO ADSI LDAP
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Shell Helper Object

 Keywords:  desktop shell helper object Shell.Application

Starting Internet Explorer 4, there has been a desktop shell helper object called Shell.Application.

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"
Examples:

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)
Exit
For a list of shell objects and methods see: http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/objects/objects.asp?frame=true http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/objects/shell/shell.asp?frame=true
Article ID:   W15588
File Created: 2003:05:13:11:29:08
Last Updated: 2003:05:13:11:29:08