Page 2 of 2 <12
Topic Options
#64876 - 2002-04-30 10:51 PM Re: Network Application shortcuts
bleonard Offline
Seasoned Scripter
*****

Registered: 2001-01-19
Posts: 581
Loc: Chicago, IL
Matthew -
You may also wish to incorporate a method, for future changes, to check/overwrite shortcuts in other locations that the user may move the desktop icon to, including Start Menu and Quick Launch bar. Otherwise, users may end up with multiple versions of a shortcut. These locations can include, depending upon O/S:

WinXP/2K
%SystemDrive%\Documents and Settings\@USERID\Application Data\Microsoft\Internet Explorer\Quick Launch
%SystemDrive%\Documents and Settings\@USERID\Start Menu\Programs
%SystemDrive%\Documents and Settings\@USERID\Start Menu
%SystemDrive%\Documents and Settings\@USERID\Desktop
%SystemDrive%\Documents and Settings\All Users\Start Menu\Programs
%SystemDrive%\Documents and Settings\All Users\Start Menu
%SystemDrive%\Documents and Settings\All Users\Desktop

WinNT
%windir%\Profiles\@USERID\Application Data\Microsoft\Internet Explorer\Quick Launch
%windir%\Profiles\@USERID\Start Menu\Programs
%windir%\Profiles\@USERID\Start Menu
%windir%\Profiles\@USERID\Desktop
%windir%\Profiles\All Users\Start Menu\Programs
%windir%\Profiles\All Users\Start Menu
%windir%\Profiles\All Users\Desktop

Win9x
%windir%\Start Menu\Programs
%windir%\Start Menu
%windir%\DeskTop

Bill

Top
#64877 - 2002-05-22 08:37 AM Re: Network Application shortcuts
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

It is possible to catch the actual location by registry keys.
An extraction from one our windows environments:
code:
REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
"Desktop"="C:\\WINDOWS\\Desktop"
"Personal"="C:\\My Documents"
"Programs"="C:\\WINDOWS\\Start Menu\\Programs"
"Start Menu"="C:\\WINDOWS\\Start Menu"
"Startup"="C:\\WINDOWS\\Start Menu\\Programs\\StartUp"

With following code you can copy f.e. shortcuts to your desktop:
code:
$desktop=ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")
COPY "\\server\netlogon\program.lnk" "$desktop" /H

greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#64878 - 2002-05-22 11:04 PM Re: Network Application shortcuts
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
No need to customize the links for each user, just append %USERNAME% as parameter and it should get translated into the username automatically.
_________________________
There are two types of vessels, submarines and targets.

Top
#64879 - 2002-05-23 08:00 PM Re: Network Application shortcuts
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
I'm trying to use addprogramitem, but it isn't configuring the startdir or icon...

any ideas?

$=addprogramgroup("Informix16",0)
$=addprogramitem("$infdir\BIN\SETNET.EXE","Setnet","",0,"$infdir\BIN",0,0,0)
$=addprogramitem("$infdir\BIN\ILogin.EXE","ILogin","",0,"$infdir\BIN",0,0,0)
$=addprogramitem("$infdir\BIN\Finderr.EXE","Finderr","",0,"$infdir\BIN",0,0,0)
$=addprogramitem("\\mad\misapps\MEDIPASS\medipass.exe","Medipass","%SystemRoot%\system32\SHELL32.dll",116,"\\mad\misapps\MediPass",0,0,0)
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#64880 - 2002-05-25 04:38 AM Re: Network Application shortcuts
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
I found out that the problem is that addprogramitem douesn't like using unc for the start dir... I change one of the statement to specify c:\ and it worked and the others didn't..

Oh well, back to WSHShortcut() (hail Shawn)
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#64881 - 2002-05-25 05:04 AM Re: Network Application shortcuts
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
rad, didn't lonkero post a all-kix-addprogramitem version of a makeshortcut udf ?
Top
#64882 - 2002-05-25 11:34 AM Re: Network Application shortcuts
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
yep... but the problem turn out to be with addprogramitem itself (I guess)

It will not configure the start in directory if it is a UNC. WSHShortcut() would

I actually wanted to make the shortcut in the users startmenu (x5). Which it did, but wouldn't put in the unc start in dir.
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
Page 2 of 2 <12


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

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

Generated in 0.133 seconds in which 0.104 seconds were spent on a total of 13 queries. Zlib compression enabled.

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