Indigo Rose Software

Go Back   Indigo Rose Software Forums > Setup Factory 8.0 > Setup Factory 8.0 Discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 09-12-2008
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,899
Windows Localizations cause File.Find to act differently?

Has anyone spotted any situation where a windows localization caused File.Find() to act differently?

I was helping someone in Norway clean up old shortcuts.

The code I used is posted below for peer-review.

He reported that *ALL* his shortcuts were removed, but not the folders...

The only way I can think of this happening is file.find() returned a list of all files...

Since I was doing this gratis, I did only cursory tests; which didn't yeild any problems, but it was not on a norway windows. I do not know what his version of windows was; but from the screen shot he sent; it appeared to be XP.

He's obviously (and understandably) rather miffed (****ed?); regardless of if he wants me to help him further; I want to know what went wrong....


Global Functions
Code:
Custom={};

function Custom.RemoveMyOldShortcuts( cFolder, bKeepFolder )
	local tShortcuts = File.Find(cFolder, "Embla Familie og Slekt*.lnk", true, true);
	if tShortcuts then
		local x;
		for x = 1, Table.Count(tShortcuts) do
			File.Delete(tShortcuts[x], false, false, false);
			if not bKeepFolder then
				Folder.Delete( String.PathOnly( tShortcuts[x] ) );
			end
		end
	end
	local tFolders = Folder.Find(cFolder, "Embla Familie og Slekt*", true);
	if tFolders then
		local x;
		for x = 1, Table.Count(tFolders) do
			Folder.Delete( tFolders[x] );
		end
	end
end



function String.PathOnly( cFQP )
	local tParts = String.SplitPath(cFQP);
	local cReturn = tParts.Drive..tParts.Folder;
	if String.Right(cReturn,1)=="\\" then
		cReturn = String.Left(cReturn,String.Length(cReturn)-1);
	end
	return cReturn;
end
On Pre Install
-- Remove
Code:
From various locations
	Custom.RemoveMyOldShortcuts( Shell.GetFolder(SHF_DESKTOP) );
	Custom.RemoveMyOldShortcuts( Shell.GetFolder(SHF_DESKTOP_COMMON) );
	Custom.RemoveMyOldShortcuts( Shell.GetFolder(SHF_STARTMENU) );
	Custom.RemoveMyOldShortcuts( Shell.GetFolder(SHF_STARTMENU_COMMON) );
	Custom.RemoveMyOldShortcuts( Shell.GetFolder(SHF_STARTMENUPROGRAMS) );
	Custom.RemoveMyOldShortcuts( Shell.GetFolder(SHF_STARTMENUPROGRAMS_COMMON) );
	Custom.RemoveMyOldShortcuts( Shell.GetFolder(SHF_DESKTOP) );
	Custom.RemoveMyOldShortcuts( Shell.GetFolder(SHF_APPLICATIONDATA) ..	"\\Microsoft\\Internet Explorer\\Quick Launch", true );
	Custom.RemoveMyOldShortcuts( Shell.GetFolder(SHF_APPLICATIONDATA_LOCAL) ..	"\\Microsoft\\Internet Explorer\\Quick Launch", true );
	Custom.RemoveMyOldShortcuts( Shell.GetFolder(SHF_APPLICATIONDATA_COMMON) ..	"\\Microsoft\\Internet Explorer\\Quick Launch",true );
__________________
Reply With Quote
  #2  
Old 09-13-2008
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,899
I see the error in my ways -- what I sent out was not what I tested..
file.find -- true,false

Not sure how that got changed....
__________________
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dependency Module: Windows Installer (MSI) 4.5 venky MSI Factory 2.0 Examples & Modules 2 3 Weeks Ago 11:39 AM
attempting to compare a variable with the contents of an array Lucian Cain AutoPlay Media Studio 5.0 4 10-17-2006 04:10 PM
INFO: JET and MDAC (Complete) Runtime Notes Desmond Setup Factory 6.0 Knowledge Base 0 11-28-2003 09:35 AM
INFO: Setup Factory and the Windows Installer Support Setup Factory 6.0 Knowledge Base 0 10-22-2002 11:38 AM
HOWTO: Install Files to the Windows Directory Support Setup Factory 6.0 Knowledge Base 0 09-18-2002 03:33 PM


All times are GMT -6. The time now is 01:44 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software