Page 1 of 1 1
Topic Options
#73300 - 2003-02-20 05:22 PM SoftLink () on Windows 95
Darren_W Offline
Hey THIS is FUN
*****

Registered: 2001-10-10
Posts: 208
Loc: Bristol, England
Hi,

Having a problems with this function not passing the full path for the icon.

EG. when the shortcut is created it show's no icon, and when you try to point it to the correct path it says: Windows cannot find the file C:\Program.

Any advice would be nice. [Smile]

Darren
_________________________
I want to share something with you - the three sentences that will get you through life.
Number 1, 'cover for me.'
Number 2, 'oh, good idea, boss.'
Number 3, 'it was like that when I got here'.

Top
#73301 - 2003-02-20 05:25 PM Re: SoftLink () on Windows 95
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Try to put the pathnames in quotes if they contian spaces, e.g.
code:
$path='"c:\program files\program\executable.exe"'

_________________________
There are two types of vessels, submarines and targets.

Top
#73302 - 2003-02-20 05:35 PM Re: SoftLink () on Windows 95
Darren_W Offline
Hey THIS is FUN
*****

Registered: 2001-10-10
Posts: 208
Loc: Bristol, England
Thanks for that idea, I had tried changing it that way on the program call, somthing like (which is wrong):

code:
  
SoftLink("%userprofile%\desktop\Maths Programs.lnk","C:\Program Files\ICT in Maths\ICTMaths.exe",,,"'C:\Program Files\ICT in Maths\Icon.ico',1")

What I have done thought is to pass the path in dos format:

code:
  
SoftLink($desktop+"\ICT in Maths.lnk","C:\Progra~1\ICTINM~1\ICTMaths.exe",,,"C:\Progra~1\ICTINM~1\Icon.ico,1")

Saves an extra line of code

Bye

Darren
_________________________
I want to share something with you - the three sentences that will get you through life.
Number 1, 'cover for me.'
Number 2, 'oh, good idea, boss.'
Number 3, 'it was like that when I got here'.

Top
#73303 - 2003-02-20 05:40 PM Re: SoftLink () on Windows 95
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
This:
"'C:\Program Files\ICT in Maths\Icon.ico',1"
should be
'"C:\Program Files\ICT in Maths\Icon.ico",1'

Please make it a habit to only use double quotes (") to enclose pathnames and use single quotes (') as string delimiters.
_________________________
There are two types of vessels, submarines and targets.

Top
#73304 - 2003-02-20 05:41 PM Re: SoftLink () on Windows 95
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
the icon part is normal in kix-side.
the normal addprogramgroup failes if the path is not in dos-format.

mm... it should though fix it by itself.
I will update it a little as it's pretty crappy style.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


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

Who's Online
0 registered and 764 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.056 seconds in which 0.025 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