Page 1 of 1 1
Topic Options
#117002 - 2004-03-29 02:40 PM Win2000 --> Win95
milhouz Offline
Fresh Scripter

Registered: 2004-03-19
Posts: 7
Hello,

I've written a script that works with windows 2000 but doesn't with Windows 95...
What can I do? Have you got any idea??


Edited by milhouz (2004-03-29 02:41 PM)

Top
#117003 - 2004-03-29 02:43 PM Re: Win2000 --> Win95
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Post the script that doesn't work, and include a little more information about which bit of it is not working.
Top
#117004 - 2004-03-29 02:50 PM Re: Win2000 --> Win95
milhouz Offline
Fresh Scripter

Registered: 2004-03-19
Posts: 7
it's a problem with the DIR command!!
$FILENAME = DIR( "c:\Progra~1\Fichie~1\2*" )
apparently, it doesn't recognize it!!

Top
#117005 - 2004-03-29 03:31 PM Re: Win2000 --> Win95
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Try trapping the error code after the DIR command...

Code:

$FILENAME = DIR( "c:\Progra~1\Fichie~1\2*" )
@ERROR " | " @SERROR ?


I suspect that the directory doesn't exist on the Win95 PC. That is the problem with hard-coding file paths.

Top
#117006 - 2004-03-29 04:11 PM Re: Win2000 --> Win95
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Chris is right..

Try reading the location in using AppPaths..

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#117007 - 2004-03-29 05:52 PM Re: Win2000 --> Win95
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
And make use of the UDF Library, as it already contains numerous DIR*() UDFs.
_________________________
There are two types of vessels, submarines and targets.

Top
#117008 - 2004-04-02 01:50 PM Re: Win2000 --> Win95
milhouz Offline
Fresh Scripter

Registered: 2004-03-19
Posts: 7
thank you for all your answers!!

but I don't understand when you speak about "location"??

Top
#117009 - 2004-04-02 04:22 PM Re: Win2000 --> Win95
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Quote:

but I don't understand when you speak about "location"??



None of the previous posts mentions the word "location". Can you please be so kind and elaborate on your problem by providing more details?
_________________________
There are two types of vessels, submarines and targets.

Top
#117010 - 2004-04-02 05:27 PM Re: Win2000 --> Win95
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
sorry jens, one does.

location is location for the proggy dir on the local-system.
it can be different for EACH system.
and you should not quess it to be the same.
in many configurations, the dir does not exist on the C-drive at all.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1302 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.046 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org