COMMON_API - Function Reference

Add,DesktopIni

Syntax

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

Parameters

1

Url

Selects common API function to execute. In this case its Add_DesktopIni. Its a mystery why Add_DesktopIni was not added to the common API.

2

Type

Specifies 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.

3

Folder

If Type is Path then this specifies the folder in which desktop.ini will be created.

4

Section

Optional 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.

5

Value

Value 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.

6

Data

The value data.

Remarks

This function is used to create a desktop.ini file in the selected folder. 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

 

Common_Api version 25.77    -   2011-03-14    -   Pedro Le 15