I have SBS 2000 as the DC and want to be able to add a shortcut to a
file on the server onto everyones desktop in the company. They have a
mix of WinXP and Win98 W/stations. I've tried to add a line to the
SBS_logon_script.bat file that changes directory to the current users
desktop and then copies linkfiles to the desktop of that users PC.
When I run this logon script file manually from a W/station it adds
the shortcuts and works fine but when I logon it doesn't add them.
Its as if the logon script doesn't run on logon. I've just realised
too that the path I've specified for the users desktop won't work for
the Win98 PCs so how do you test for OS? Below is close to the lines
that I've added.

cd C:\Documents and Settings\%username%\Desktop\
copy \\servername\files\linkfile.lnk

Any ideas?

Re: Adding a shortcut to all users desktops by Marina

Marina
Mon Dec 29 04:13:02 CST 2003

Those W9x won't recognize the %username%.
To recognize the OS, use the following in the loginscript:

if "%PROCESSOR_ARCHITECTURE%" = = "" SET DIRECTORY=win98
if "%PROCESSOR_ARCHITECTURE%" = = "x86" SET DIRECTORY=i386
if "%DIRECTORY%" = = "" goto exit


--
Regards,

Marina

"Aaron" <aaronwills@hotmail.com> schreef in bericht
news:6687cba7.0312282043.2f4a8ffa@posting.google.com...
> I have SBS 2000 as the DC and want to be able to add a shortcut to a
> file on the server onto everyones desktop in the company. They have a
> mix of WinXP and Win98 W/stations. I've tried to add a line to the
> SBS_logon_script.bat file that changes directory to the current users
> desktop and then copies linkfiles to the desktop of that users PC.
> When I run this logon script file manually from a W/station it adds
> the shortcuts and works fine but when I logon it doesn't add them.
> Its as if the logon script doesn't run on logon. I've just realised
> too that the path I've specified for the users desktop won't work for
> the Win98 PCs so how do you test for OS? Below is close to the lines
> that I've added.
>
> cd C:\Documents and Settings\%username%\Desktop\
> copy \\servername\files\linkfile.lnk
>
> Any ideas?



Re: Adding a shortcut to all users desktops by Steve

Steve
Mon Dec 29 06:36:54 CST 2003

Aaron wrote:

> I have SBS 2000 as the DC and want to be able to add a shortcut to a
> file on the server onto everyones desktop in the company. They have a
> mix of WinXP and Win98 W/stations. I've tried to add a line to the
> SBS_logon_script.bat file that changes directory to the current users
> desktop and then copies linkfiles to the desktop of that users PC.
> When I run this logon script file manually from a W/station it adds
> the shortcuts and works fine but when I logon it doesn't add them.
> Its as if the logon script doesn't run on logon. I've just realised
> too that the path I've specified for the users desktop won't work for
> the Win98 PCs so how do you test for OS? Below is close to the lines
> that I've added.
>
> cd C:\Documents and Settings\%username%\Desktop\
> copy \\servername\files\linkfile.lnk
>
> Any ideas?

For the XP machines, I would simply push the LNK file out to
\\<machine>\C$\Documents And Settings\All Users\Desktop on each machine
manually from the server. Then the shortcut will always appear on each
machine, no matter who logs on.

For the Win98 machines, you should really look to retire them. Managing
mixed OS workstations is just such a PITA.

Beyond that, you need to find where the desktop is for Win98, because
it's completely different than XP. IIRC, by default all users share a
common desktop, though ISTR Win98 being capable of storing desktop
settings on a per-user basis, if you configured it that way.

I hope the LNK file uses UNC names for its' information too, otherwise
the shortcut will be invalidated.

--
Steve Foster [SBS MVP]
---------------------------------------
MVPs do not work for Microsoft. Please reply only to the newsgroups.

Re: Adding a shortcut to all users desktops by Jeff

Jeff
Tue Dec 30 09:01:42 CST 2003

VBscript (and also JSscript) provide tools to accomplish such tasks, though
you may need to install the updated WSH version to the older machines in
order to get common support of functions.

Below is a sample VBscript to create a shortcut.

set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
set oShellLink = WshShell.CreateShortcut(strDesktop & "\Shortcut
Script.lnk")
oShellLink.TargetPath = WScript.ScriptFullName
oShellLink.WindowStyle = 1
oShellLink.Hotkey = "CTRL+SHIFT+F"
oShellLink.IconLocation = "notepad.exe, 0"
oShellLink.Description = "Shortcut Script"
oShellLink.WorkingDirectory = strDesktop
oShellLink.Save
set oUrlLink = WshShell.CreateShortcut(strDesktop & "\Microsoft Web
Site.url")
oUrlLink.TargetPath = "http://www.microsoft.com"
oUrlLink.Save