Page 1 of 1 1
Topic Options
#30667 - 2002-10-15 11:22 AM AddProgramItem Problem ?? Can anybody help ?
sc00byd00byd00 Offline
Lurker

Registered: 2002-10-15
Posts: 2
Loc: Manchester, UK
Hey all,

I am new to this kix script thing and I am having a little difficulty understanding the language and what it does.

The problem I have is trying to add an Icon the "All Users" Program Group within an NT4 Machine, I have basically written a batch file to copy a tree of directories to every users machine, and then called the kix script to create the Icon to it;

ADDPROGRAMITEM("C:\CRAMER4\CRAMER.EXE", "Cramer4", "C:\CRAMER4\CRAMER.EXE", 0, "c:\cramer4", 0, 0, 1)

Now this works, on a 2000 machine, it copies itself to the "All Users" profile, but under NT, it copies itself to the "Administrator" profile (the one that I was currently logged on with)

Also, is there a way of creating a common program group and then inserting the Icon into it ? (From what I can see in the notes, there is nothing to say that the icon should be inserted into the program group that you have just created ?

Hopefully somebody can help me ??

Thanks in advance,

Scott
[Eek!] [Eek!] [Eek!] [Eek!]

Top
#30668 - 2002-10-15 11:32 AM Re: AddProgramItem Problem ?? Can anybody help ?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yeh...
this is not easy function.
so you probably have the addprogramgroup before?
anyway, what really control where the icon is going is by ShowProgramGroup()

if I remember correctly, you can put it in start-menu porgrams if you do not specify the programgroup.

but, if you don't get this to work after 2hour trying I suggest you that you make the shortcuts before hand and just copy them to correct places.

cheers.

{edit}
fixed the link.

[ 15. October 2002, 12:57: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#30669 - 2002-10-15 06:29 PM Re: AddProgramItem Problem ?? Can anybody help ?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
You will also need to be aware of permissions. By default, Windows NT/2000/XP require administrative privileges in order to write to the 'All Users' profile. See also the KiXtart Manual under ADDPROGRAMGROUP(). The better way is to dynamically create the .LNK file in the desired folder if the file does not already exists. Alternatively, one can copy .LNK files from a central location into the desired folders.

[ 16. October 2002, 16:10: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#30670 - 2002-10-16 09:52 AM Re: AddProgramItem Problem ?? Can anybody help ?
sc00byd00byd00 Offline
Lurker

Registered: 2002-10-15
Posts: 2
Loc: Manchester, UK
We've come accross this issue before, the problem lies in copying a link that one day, this guy turned his machine off and the whole system went down, we cou'dn't figure out why, until we started looking at the shortcuts on the machine.... it turned out that everymachine that had the install had a shortcut pointing to the exe file on one guys machine.

I can only imagine how slow his machine must have been going !! [Eek!] [Eek!] [Eek!]

Hense trying to write to the common program group.

Is there any script/function to give the user local admin privileges whilst the install runs and then remove them again later ?

Scott

-------------------------------------------------
It aint the size of your car, its the size of your arm hangin out of it that counts [Eek!] [Big Grin] [Big Grin] [Eek!]

Top
#30671 - 2002-10-16 01:26 PM Re: AddProgramItem Problem ?? Can anybody help ?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
scott, with su.exe you can do something similar...

what comes about the link pointing to one wksta, wonder who had the wisdom of making it that way?
_________________________
!

download KiXnet

Top
#30672 - 2002-10-16 04:13 PM Re: AddProgramItem Problem ?? Can anybody help ?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See also Copy a shortcut to the Desktop, Start Menu, etc. .

I am using the Task Scheduler initialized via the ScheduleTask UDF to copy prepared .LNKs from a central location to the 'All Users' profile. Additionally, I'm stripping the UNC information out of the .LNK files, thus a shourtcut would not work if the appropriate drive map doesn't exist. I'm using SCUT.EXE for this.
_________________________
There are two types of vessels, submarines and targets.

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 484 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.033 seconds in which 0.013 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