Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Location
    Spring Hill, FL
    Posts
    63

    Exit if run from UNC Path

    Does anyone already have the code to stop the installer if it was run from a unc path. I need all of our installers to only run from a drive letter.

  2. #2
    Join Date
    Jan 2000
    Posts
    2,002
    What about checking the value of _SourceFolder or even _SourceDrive?

  3. #3
    Join Date
    Mar 2005
    Location
    WA 'wait a while' - Australia
    Posts
    872
    Along the lines of Brett's suggestion - here's a bit of code.

    place the function in Global Functions if you wish
    and call it from the 'On Startup' actions.

    Code:
    function IsFixedDrive()
    local tDrvs = Drive.Enumerate();
    bFixed_drv = false;
    local D_verify = String.Mid(_SourceFolder, 1, 3);
    for n, drv in tDrvs do
    	if (Drive.GetType(drv) == 3) then --fixed only	
    		if (String.CompareNoCase(drv, D_verify) == 0) then
    		Dialog.Message("Confirmed Fixed Drive", drv); --delete
    		bFixed_drv = true;
    		break;
    		end
    	end
    end
    return bFixed_drv;
    end
    
    --to call it
    if (not IsFixedDrive()) then
    Application.Exit(0); --change to suit
    end

    HTH

  4. #4
    Join Date
    Oct 2003
    Location
    Spring Hill, FL
    Posts
    63
    You guys Rock ! thanks worked great...

Similar Threads

  1. File.Copy bugs with UNC paths (\\somecomputer\somedrive) ?
    By whazat in forum Setup Factory 7.0
    Replies: 3
    Last Post: 02-10-2005, 07:00 AM
  2. How get Exit Code from program run in setup?
    By Telmo in forum Setup Factory 6.0
    Replies: 1
    Last Post: 12-05-2003, 01:14 PM
  3. Check for UNC Path
    By holland_stephen in forum Setup Factory 6.0
    Replies: 0
    Last Post: 10-22-2003, 12:44 PM
  4. Parse path - Drive and Folder - UNC
    By rknol in forum Setup Factory 6.0
    Replies: 2
    Last Post: 12-06-2001, 11:49 PM
  5. UNC Path Error
    By stevensconcepts in forum Setup Factory 5.0
    Replies: 2
    Last Post: 12-08-2000, 02:18 PM

Posting Permissions

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