add

WinBuilder

Add



Add,DesktopIni

Create a desktop.ini file in the selected folder allowing you to specify how a file system folder is viewed.

Syntax

Add,DesktopIni,Type,[Folder],[Section],Value,Data

Parameters

1UrlSelects common API function to execute. In this case its Add_DesktopIni. Its a mystery why Add_DesktopIni was not added to the common API.
2TypeSpecifies the target directory where the desktop.ini file will be created.
Desktop - Desktop.ini will be created in the desktop folder.
StartMenu - Desktop.ini will be created in the Start Menu folder.
StartMenuRoot -Desktop.ini will be created in the root of the Start Menu folder.
Accessories - Desktop.ini will be created in the Accessories folder.
QuickLaunch - Desktop.ini will be created in the Quick Launch folder.
SendTo - Desktop.ini will be created in the Send To folder.
Path - Desktop.ini will be created in the path specified in the Folder parameter.
3FolderIf Type is Path then this specifies the folder in which desktop.ini will be created.
4!SectionOptional parameter that specifies the section in desktop.ini to be updated. If specified it must be. ShellClassInfo as that is the only section supported by windows.
5ValueValue name to be updated in the selected desktop.ini file.
ConfirmFileOp - Set this entry to 0 to avoid a "You Are Deleting a System Folder" warning when deleting or moving the folder.
NoSharing - Not supported under Windows Vista or later. Set this entry to 1 to prevent the folder from being shared.
IconFile - If you want to specify a custom icon for the folder, set this entry to the icon's file name. The .ico file name extension is preferred, but it is also possible to specify .bmp files, or .exe and .dll files that contain icons. If you use a relative path, the icon is available to people who view the folder over the network. You must also set the IconIndex entry.
IconIndex - Set this entry to specify the index for a custom icon. If the file assigned to IconFile only contains a single icon, set IconIndex to 0.
InfoTip - Set this entry to an informational text string. It is displayed as an infotip when the cursor hovers over the folder. If the user clicks the folder, the information text is displayed in the folder's information block, below the standard information.
6DataThe value data.

Remarks

The Desktop.ini file is a text file that allows you to specify how a file system folder is viewed. The ShellClassInfo section, allows you to customize the folder's view by assigning values to the appropriate entries.   File system folders are commonly displayed with a standard icon and set of properties, which specify, for instance, whether or not the folder is shared. You can customize the appearance and behavior of an individual folder by creating a Desktop.ini file for that folder.   Will only work for Windows 7 if the desktop.ini file is the only file in the folder. This basically makes the feature useless as what is the point of having a custom icon for an empty folder.

Example

Add,DesktopIni,StartMenu,,,WordPad.lnk,shell32.dll#$c-22069
Add,DesktopIni,Path,%Target_PE%\AFolder,.ShellClassInfo,LocalizedResourceName,@shell32.dll#$c-28996
Add,DesktopIni,Path,%Target_PE%\AFolder,.ShellClassInfo,IconFile,#$pSystemRoot#$p\system32\SHELL32.dll
Add,DesktopIni,Path,%Target_PE%\AFolder,.ShellClassInfo,IconIndex,25




Add,Shortcut

See Add_Shortcut for documentation, since they are just two different ways to call the same AP functionality



Add,URL

Creates URL file links for default browser.

Syntax

Add,Url,[Type],<FileName>,<WebAddress>,[IconFile],[IconIndex],[HotKey]

Parameters

1UrlSelects common API function to execute. In this case its Add_URL. Its a mystery why Add_URL was not added to the common API.
2TypeOptional parameter specifying target directory where the URL file link will be created. Assuming favorites is chosen as the target directory then the links will automatically appear in the IE favorites menu. There is no current mechanism to create links that will appear in other browser's bookmarks menu.
Favorites - URL link will be created in the IE favorites folder.
Links - URL link will be created in the IE Links folder.
StartMenu - URL link will be created in the StartMenu folder.
StartMenuRoot - URL link will be created in the root of the Start Menu.
Desktop - URL link will be created on the desktop.
Path - URL link will be created in the path specified in the path part of the FileName parameter.
3FileNameFile name of the URL link file that will be created.
4WebAddressWeb Address associated with the URL link.
5IconFileOptional parameter specifying full path of icon file to be associated with the URL link file. Can be specified as UrlDLL to reference the url.dll system file.
6IconIndexOptional parameter specifying the icon index from the IconFile. If not specified then the first icon in the specified file will be used.
7HotKeyOptional parameter specifying the hotkey used to launch the URL by the default browser. !Hotkeys are specified using the text form of the key separated by + e.g. CTRL+ALT+A.

Examples

  • Create in Favorites Folder:
  • Add,Url,,Google.url,http://www.google.com
    Add,Url,Favorites,"My Folder\Google.url",http://www.google.com
    Add,Url,,Google.url,http://www.google.com,UrlDLL
    Add,Url,,Google.url,http://www.google.com,#$psystemroot#$p\system32\blabla.ico
  • Create in Links Folder
  • Add,Url,Links,Google.url,http://www.google.com
  • Create in Start Menu
  • Add,Url,StartMenu,Google.url,http://www.google.com
  • Create in Start Menu root folder:
  • Add,Url,StartMenuRoot,Google.url,http://www.google.com
  • Create on Desktop:
  • Add,Url,Desktop,Google.url,http://www.google.com
  • Create in specified folder:
  • Add,Url,Path,%target_win%\Google.url,http://www.google.com