Tuesday, September 21, 2010

installshield add shortcut to the desktop,startup,program script

function OnFirstUIBefore()
    number  nResult, nLevel, nSize, nSetupType,nvType,nvSize;
    string  szTitle, szMsg, szOpt1, szOpt2, szLicenseFile,szKey,szName,svValue,szNumName;
    string  szCompany, szTargetPath, szDir, szFeatures, szTargetdir,svNumValue;
    BOOL    bLicenseAccepted;
begin
  
    nSetupType = COMPLETE;
    szDir = TARGETDIR;
    szName = "";
    szCompany = "";
    bLicenseAccepted = FALSE;
   
    MessageBox("I am here",INFORMATION);
    AddFolderIcon(FOLDER_DESKTOP,"Shortcut for notepad","C:\\notepad.exe","","C:\\xyz.jpg",0,"",REPLACE);
    AddFolderIcon(FOLDER_STARTUP,"Shortcut for notepad","C:\\notepad.exe","","",0,"",REPLACE);
    AddFolderIcon(FOLDER_STARTMENU,"Shortcut for notepad","C:\\notepad.exe","","",0,"",REPLACE);
    AddFolderIcon(FOLDER_PROGRAMS,"Shortcut for notepad","C:\\notepad.exe","","",0,"",REPLACE);
 
    RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
    //RegDBCreateKeyEx("SOFTWARE\\CreateKeyExample","");
    //nvType=123;
    RegDBGetKeyValueEx("SOFTWARE\\nijo","My Name",nvType,svValue,nvSize);
    MessageBox("Value is: "+svValue,INFORMATION);
   

No comments:

Post a Comment