PDA

View Full Version : Target line syntax for Shortcut help



robl
08-22-2008, 08:47 AM
I'm trying to create a shortcut that uses a resource in the target line. It should look like this:

"c:\Program Files\MyApp\Myapp.exe" c:\resource\resource.nod

but using the Shell.CreateShortcut action, the closest I get is this:

"c:\Program Files\MyApp\Myapp.exe" c:\resource\resource.nod"

seems like Setup Factory is adding an extra quotation mark at the end of the string, which of course Windows won't accept. I'm evaluating the software, so I need to be able to work around this problem. Help please!:huh

Mark
08-22-2008, 09:08 AM
Hi robl,

Perhaps paste in the line of code that you are using to create your shortcut. Remember to use the "CmdLine" parameter to pass your resource to the shortcut and do not include it in the target.

You can also create shortcuts by double clicking on the file in the main file list and then creating the shortcut on the shortcut tab. The nice thing about using the shortcut tab is that the shortcuts will be removed when you uninstall.

robl
08-22-2008, 12:24 PM
Thanks for the quick reply Mark. I'm actually trying to install an updated report that will use the "exe" to run, but not installing the "exe" each time. That's why I'm not using the double-click method you mentioned. Here's my syntax.


target_line = "\\Program Files\\MyApp\\MyApp.exe"--.."\"".." c:\\resource\\resource.nod"

Shell.CreateShortcut(_DesktopFolder,
"Report Update",
target_line,
"",
"",
"C:\\Program Files\\MyApp\\MyApp.exe",
0, SW_MAXIMIZE, nil, "NPD Group");

Mark
08-22-2008, 02:05 PM
Hi robl,

As I said in my initial replay you should be using the CmdLine parameter to pass your resource to the executable:



Shell.CreateShortcut(_DesktopFolder
, "Report Update"
, "C:\\Program Files\\MyApp\\MyApp.exe"
, "c:\\resource\\resource.nod"
, ""
, "C:\\Program Files\\MyApp\\MyApp.exe"
, 0
, SW_MAXIMIZE
, nil
, "NPD Group");


Give that a try and let me know what the results are.

robl
08-25-2008, 07:26 AM
Thanks for walking me thru that Mark.:yes