cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Alex1969
Level 4

AddFolderIcon and command-line parameters

Hi all,

I'd like to have a command-line in the following form:
"C:\Program Files\Rexroth\BS350 V2.207\BS350.exe" "-crv"


Unfortunately I seems not to be able to do this with the function "AddFolderIcon".

I tried like it is described in the help without success:


strCmdLine = TARGETDIR ^ IFX_PRODUCT_KEY;
LongPathToQuote(strCmdLine, TRUE);
strParam = "-crv";
nRet = AddFolderIcon ( FOLDER_DESKTOP , gstrProdName , strCmdLine^strParam , TARGETDIR, "" , 0 , "" , REPLACE );

Result: "C:\Program Files\Rexroth\BS350 V2.207\BS350.exe"\-crv"


strCmdLine = TARGETDIR ^ IFX_PRODUCT_KEY;
LongPathToQuote(strCmdLine, TRUE);
strParam = "-crv";
LongPathToQuote(strParam, TRUE);
nRet = AddFolderIcon ( FOLDER_DESKTOP , gstrProdName , strCmdLine^strParam , TARGETDIR, "" , 0 , "" , REPLACE );

Result: "C:\Program Files\Rexroth\BS350 V2.207\BS350.exe"\-crv"


strCmdLine = TARGETDIR ^ IFX_PRODUCT_KEY + " -crv";
LongPathToQuote(strCmdLine, TRUE);
nRet = AddFolderIcon ( FOLDER_DESKTOP , gstrProdName , strCmdLine^strParam , TARGETDIR, "" , 0 , "" , REPLACE );

Result: "C:\Program Files\Rexroth\BS350 V2.207\BS350.exe -crv""


strCmdLine = TARGETDIR ^ IFX_PRODUCT_KEY + "\"" + " -crv";
LongPathToQuote(strCmdLine, TRUE);
nRet = AddFolderIcon ( FOLDER_DESKTOP , gstrProdName , strCmdLine^strParam , TARGETDIR, "" , 0 , "" , REPLACE );

Result: "C:\Program Files\Rexroth\BS350 V2.207\BS350.exe" -crv"\


strCmdLine = TARGETDIR ^ IFX_PRODUCT_KEY + "\" " + "-crv";
LongPathToQuote(strCmdLine, TRUE);
nRet = AddFolderIcon ( FOLDER_DESKTOP , gstrProdName , strCmdLine^strParam , TARGETDIR, "" , 0 , "" , REPLACE );

Result: "C:\Program Files\Rexroth\BS350 V2.207\BS350.exe" -crv"\


May you have any hints for me?

Kind regards Alex
Labels (1)
0 Kudos
(4) Replies
Alex1969
Level 4

Hi all,

by trying and documenting the question I had some new ideas. One of them works fine:


strCmdLine = TARGETDIR ^ IFX_PRODUCT_KEY;
LongPathToQuote(strCmdLine, TRUE);
strParam = "\"-crv\""; //LongPathToQuote fails
nRet = AddFolderIcon ( FOLDER_DESKTOP , gstrProdName , strCmdLine + " " + strParam , TARGETDIR, "" , 0 , "" , REPLACE );

Result as needed: "C:\Program Files\Rexroth\BS350 V2.207\BS350.exe" "-crv"

Thanks for viewing this thread.

Kind regards Alex
0 Kudos
Not applicable

Hello, Alex

Use AddFolderIcon on InstallAnywhere 2010?

Kevin
0 Kudos
pv7721
Level 20

Yeah, are you sure you're in the correct forum here? I don't think IA supports the line parameters you indicated...
0 Kudos
Alex1969
Level 4

You all are right. When I created the thread I thought I'm in the InstallShield2010 forum.

Sorry about the wrong group.

@admin: I don't know how to move the thread to the correct group (IS2010). Please could you move this thread to InstallShield2010 group?

TIA Alex
0 Kudos