I would like to check if a particular Program Folder (in Start button menu) already exists. Could someone tell me or post some code to show how to check?
In the Help, there's the ExistsDir function but it's not exactly what I need because it's used to check a disk folder, not a Program Folder.
I found the page about the CreateProgramFolder function, and it says that when 0 is returned, that "indicates that the function successfully added the folder to the target system or that the folder already existed"!! Well, this isn't really very helpful either :-(
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Checking for existing Program Folder
Started by
seaktf
, Jan 27 2003 17:39
2 replies to this topic
Posted 27 January 2003 - 17:43
Maybe I need to give more precisions. I use the following code:
-------
Dlg_SdSelectFolder:
szfolder = SHELL_OBJECT_FOLDER;
szTitle = "";
szMsg = "";
nResult = SdSelectFolder( szTitle, szMsg, szfolder );
if (nResult = BACK) goto Dlg_ObjDialogs;
-------
So in szfolder is the name of Program Folder to create. How can I check if the name exists already?
TIA
-------
Dlg_SdSelectFolder:
szfolder = SHELL_OBJECT_FOLDER;
szTitle = "";
szMsg = "";
nResult = SdSelectFolder( szTitle, szMsg, szfolder );
if (nResult = BACK) goto Dlg_ObjDialogs;
-------
So in szfolder is the name of Program Folder to create. How can I check if the name exists already?
TIA
Posted 27 January 2003 - 19:29
Use QueryProgItem instead and pass "" for szfolder for szItemName. See IS help for further details.