Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-25-2003, 12:54 AM
Member
 
Join Date: Sep 2003
Posts: 95
Default getSpecialFolder not working correctly for Windows ME?

Hi,

Currently have an installer app that needs to create a lot of shortcuts to the desktop and the start menu.

However, using getSpecialFolder("startup all") or getSpecialFolder("program files") seems to work OK when I use it on Windows 2000, but returns "C:\undefined\...." as a path with ME....

Can anyone else confirm this?

If so we have a problem ;D

Cheers,

G.
Reply With Quote
  #2 (permalink)  
Old 09-25-2003, 03:12 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:getSpecialFolder not working correctly for Windows ME?

Hi,

getSpecialFolder("startup all") works well on ME.
getSpecialFolder("program files") cannot work

But if you need to create shortcut on start menu, you should use
getSpecialFolder("programs")


The getSpecialFolder("program files") only works on NT, 2000, XP, it's a bug. If you want to get the "program files" folder on any windows platform, you should use the following code.
Code:
function get_program_files_folder()
{
var str = Shell.getSpecialFolder("program files");
if (str == undefined)
{
var key = new RegKey("HKLM\\software\\microsoft\\windows\\currentversion");
str = key.getValue("ProgramFilesDir").data;
}

return str;
}

trace(get_program_files_folder());
Reply With Quote
  #3 (permalink)  
Old 09-26-2003, 03:03 AM
Member
 
Join Date: Sep 2003
Posts: 95
Default Re:getSpecialFolder not working correctly for Windows ME?

;D

Lifesaver....

Thanks for that, the app now works for 98 and ME!

(btw, is there a list of known bugs available anywhere for future reference?)

Cheers,

G.
Reply With Quote
  #4 (permalink)  
Old 09-26-2003, 10:55 AM
Member
 
Join Date: Sep 2003
Posts: 95
Default Re:getSpecialFolder not working correctly for Windows ME?

hmmm....

which other getSpecialFolder commands do not work under ME and 98?

Currently the app also needs to write the files to the start menu->Programs for ALL users....

getSpecialFolder("programs all") and getSpecialFolder("startmenu all) don't seem to work either....

I think I may have to go back to the drawing board and check the users operating system, find the drive letter that has Windows on it, and then look for the relevant subfolders from there.... getSpecialFolders is just too buggy atm....

Thanks for your help anyway.

G.
Reply With Quote
  #5 (permalink)  
Old 09-27-2003, 09:09 AM
Member
 
Join Date: Sep 2003
Posts: 95
Default Re:getSpecialFolder not working correctly for Windows ME?

Please refer to:

http://www.swfkit.com/forum/thread_3_201.html

Cheers,

G.
Reply With Quote
  #6 (permalink)  
Old 09-28-2003, 03:19 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:getSpecialFolder not working correctly for Windows ME?

Hi,

The parameters of the getSpecialFolder method can be divided into 5 types,

1. "windows"
2, "temp"
3. "system"
4. "program files"
5. all others

The only bug is that getSpecialFolder("program files") cannot work on win9x.

For type 5, not all parameters are valid for win9x. Eg. "programs all" is only valid for Windows NT, Windows 2000, and Windows XP

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/enums/csidl.asp

***appdata CSIDL_APPDATA;
cookies *********CSIDL_COOKIES;
desktop *********CSIDL_DESKTOPDIRECTORY;
desktopall *********CSIDL_COMMON_DESKTOPDIRECTORY;
favorites *********CSIDL_FAVORITES;
fonts *********CSIDL_FONTS;
history *********CSIDL_HISTORY;
internetcache ******CSIDL_INTERNET_CACHE;
mydocuments ******CSIDL_PERSONAL;
nethood *********CSIDL_NETHOOD;
printers *********CSIDL_PRINTERS;
programs *********CSIDL_PROGRAMS;
programsall ******CSIDL_COMMON_PROGRAMS;
recent ************CSIDL_RECENT;
sendto ************CSIDL_SENDTO;
startmenu *********CSIDL_STARTMENU;
startmenuall ******CSIDL_COMMON_STARTMENU;
startup *********CSIDL_STARTUP;
startupall *********CSIDL_COMMON_STARTUP;
templates *********CSIDL_TEMPLATES;
Reply With Quote
  #7 (permalink)  
Old 09-30-2003, 01:53 AM
Member
 
Join Date: Sep 2003
Posts: 95
Default Re:getSpecialFolder not working correctly for Windows ME?

;D

Thanks for that link, it will be very useful for future reference.

I assume your help pages will be updated in v2.0 to reflect this? I mean, it isn't like every SWFKit user will know what commands should and shouldn't work for each operating system, and it certainly has nothing about it in the current version....

I also think it is a little misleading to tell someone that a command works correctly when it actually doesn't.
e.g. "startup all" does not work correctly on either 98 or ME. Sure, if you put an exe there it will start at boot time, but you can't see it in the Start Menu, and you can only delete it if you write a SWFKit command or manually delete it from Windows\All Users\Start Menu\Programs\Startup.

Granted, that isn't entirely your fault (it looks like a Windows bug *shock horror*) but it still meant that I was wasting time trying to fix problems after being assured it would be alright....

Once again though, thanks for all your replies, the app was completed and seems to be working as hoped.

G.
Reply With Quote
Reply

Was this information helpful?    Yes No



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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:02 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.