function setFolder()
STRING szParam,szKey, szNumName, szNumValue;
NUMBER nvType, nvSize;
NUMBER rtn;
begin
rtn = RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
szKey = "SOFTWARE\\Autodesk\\AutoCAD\\R17.0\\ACAD-5001:804";
nvType = REGDB_STRING;
szNumName = "AcadLocation";
szNumValue = "";
nvSize = -1;
rtn = RegDBGetKeyValueEx(szKey, szNumName, nvType, szNumValue, nvSize);
if( rtn < 0 ) then
szKey = "SOFTWARE\\Wow6432Node\\Autodesk\\AutoCAD\\R17.0\\ACAD-5001:804";
rtn = RegDBGetKeyValueEx(szKey, szNumName, nvType, szNumValue, nvSize);
if( rtn < 0 ) then
MessageBox("找不到CAD程序",INFORMATION);
return FALSE;
endif;
endif;
if( nvType != REGDB_STRING) then
return FALSE;
endif;
if( nvSize <= 0 ) then
return FALSE;
endif;
szParam = szNumValue ^ "\\acad.exe";
CreateProgramFolder( SHELL_OBJECT_FOLDER );
ShowProgramFolder( SHELL_OBJECT_FOLDER, SW_SHOW );
//szParam = TARGETDIR ^ "\\autoStart.exe";
LongPathToQuote( szParam ,TRUE );
AddFolderIcon( SHELL_OBJECT_FOLDER, "江门市电子报批-设计端", szParam,
TARGETDIR , "", 0, "", REPLACE );
AddFolderIcon( FOLDER_DESKTOP, "江门市电子报批-设计端", szParam,
TARGETDIR, "", 0, "", REPLACE );
if(nWindVer>=6) then
if(Is(FILE_EXISTS,TARGETDIR^"\\modifyShortCut.exe")) then
LaunchAppAndWait(TARGETDIR^"\\modifyShortCut.exe","江门市电子报批-设计端.lnk",WAIT);//安装engine
endif;
endif;