Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    113

    Shell.CreateShortcut problem

    I have a problem with the "target" file path being truncated after the 8th character in the second line of code below. The first is ok and they are identical except for the drive letter, which is a remote network drive.

    Does anyone have an idea as to why it is being truncated?

    Shell.CreateShortcut(icon_folder, icon_name, bpath..batchname, save, utsfolder, utsfolder.."\\wise.ico", 0, 7, nil);

    Shell.CreateShortcut(icon_folder, "WKS_"..icon_name, targetp, "", remote_utsfolder, remote_utsfolder.."\\wise.ico", 0, 7, nil);

    Thanks,
    Lee

  2. #2
    Join Date
    May 2001
    Location
    51.531249 | -0.610962
    Posts
    1,244
    What's the value of targetp? Have you tried using UNC instead?
    -
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]

  3. #3
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    113
    Quote Originally Posted by Derek View Post
    What's the value of targetp? Have you tried using UNC instead?
    targetp is Z:\UTS07\TWICONS\CenRidLib\CenRidLib.bat

    UNC? please explain.

    I just found that if the remote drive is mapped, or it is an encrypted drive that is mounted it works ok. But if the remote drive is not available when the code is run the "b" is truncated from CenRidLib in both places.

    Could this be an AMS bug?

    Lee

  4. #4
    Join Date
    Aug 2003
    Posts
    2,427
    UNC (Universal Naming Convention) or a way to address a network resource in the format "\\servername\foldername\subfoldername\filenam e".

    FWIW I'd go further than Derek and say if you are addressing networked resources, then never never ever use drive names e.g. "Z:/foldername/filename".

    The way drives are mapped for one user will inevitably be different for someone else.

    If it's just a drive attached to your own machine and you are the only one who is going to use the application that's a different matter.

    p.s. - The forum is adding spaces again!! I didn't put a space in "filename" at the end of the first sentence.

  5. #5
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    113
    Thanks longedge. At the point I'm building this app the server name is unknown, and will vary. However, every workstation that the shortcut is to be used on will have drive Z mapped to the correct server.

    Lee

  6. #6
    Join Date
    May 2001
    Location
    51.531249 | -0.610962
    Posts
    1,244
    I just tested this and had the same problem. The 'b' is missing in both places when specifying an unavailable mapped drive.
    UNC did work, however. Tho if the server name is unknown/variable it could prove a little difficult!
    -
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]

  7. #7
    Join Date
    Aug 2003
    Posts
    2,427
    Quote Originally Posted by leebos View Post
    Thanks longedge. At the point I'm building this app the server name is unknown, and will vary. However, every workstation that the shortcut is to be used on will have drive Z mapped to the correct server.

    Lee
    As long as you are aware of the potential problem that's fine. In our organisation I would only ever use fully qualified UNC's. Drive mapping is very useful but can sometimes be a double edged sword

  8. #8
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    113
    Thanks Derek, I posted it as a bug in the suggestions/bugs forum. Possibly IR can fix it.

    Lee

Similar Threads

  1. Problem installing fonts
    By ByronFS in forum Setup Factory 7.0
    Replies: 5
    Last Post: 05-08-2006, 12:23 PM
  2. Shell.CreateShortcut problem
    By MDogan in forum Setup Factory 7.0
    Replies: 4
    Last Post: 12-27-2004, 10:05 AM
  3. PROBLEM: Setup Starts and then Crashes
    By Support in forum Setup Factory 5.0
    Replies: 0
    Last Post: 10-15-2002, 03:02 PM
  4. PROBLEM: Setup Requests Disk 2 in a Single File Setup
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-09-2002, 02:04 PM
  5. INFO: Tips for Debugging Action Lists in AutoPlay Media Studio 4.0
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-03-2002, 08:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts