Scripts Thread, office 2000 +office2003 shortcuts in Coding and Web Development; Hi all we currently operate in mixed office mode so i want to try and create a script that will ...
-
26th January 2007, 11:29 PM #1
- Rep Power
- 12
office 2000 +office2003 shortcuts
Hi all we currently operate in mixed office mode so i want to try and create a script that will work out what version of office is installed on the pc and copy the correct office shortcuts to the desktop from a server share. At present i use redirected start menus, and desktops and just copy two sets of shortcuts (office 2000 & office 2003) and the users have to work out which is installed so far i have put a file on all the office 2000 machines called office2000 and created the following:
if exist "c:\office2000 goto office2000"
copy "\\servername\share\desktop2003\*.*" "%userprofile%\desktop\"
ffice2000
copy "\\servername\share\desktop2000\*.*" "%userprofile%\desktop\"
:end
But it copys them all over ? its late on a friday night and i'm missing something simple but what anyone?
cheers as always in advance.
-
-
IDG Tech News
-
27th January 2007, 12:53 AM #2
- Rep Power
- 14
Re: office 2000 +office2003 shortcuts
I can see two problems
This if test will fail because you have put quotes round the goto.There should only be round the file name, really only file name contains white space..

Originally Posted by
Uraken if exist "c:\office2000 goto office2000"
So now the script copies the Office 2003 shortcut
copy "\\servername\share\desktop2003\*.*" "%userprofile%\desktop\"
But you forgot to put a goto to jump to the end of the script so now the script copies the Office 2000 shortcut

ffice2000
copy "\\servername\share\desktop2000\*.*" "%userprofile%\desktop\"
:end
Yes it's Friday night and I'm sober \\
/
-
-
27th January 2007, 03:58 PM #3
- Rep Power
- 14
Re: office 2000 +office2003 shortcuts
For completeness, I would also have to say that besides scripting you have two other options:
MSI Tranforms
If you have deployed office using a GPO then you can create an MST with Custom Maintanenance Wizard to place the office app shortcuts on the desktop.
Manually copy shortcuts to C:\Documents and Settings\All Users\Desktop
As you gone to the trouble of placing the C:\Office2000 files on the Office machines why not just copy the relevant shortcuts to All Users on each machine. This would much simpler even if you were using roaming profiles.
Just of interest, is there a particular reason why the script does things on a per user basis? Now, although the file copy won't take much time out of each log-on, It's still being performed each time a user logs in.
You may also want to test for the Office applciation folder (e.g. C:\Program Files\Microsoft Office\Office11 for Office 2003) rather than putting the C:\Office file on the on each computer.
OK. I've gone on long enough so I'll shut up now.
----------------------------------------------------------------------
Have a desire to make the world a better place one punctuation mark at a time?
Visit our site at http://www.nitpickers-anonymous.org
-
-
28th January 2007, 12:43 PM #4
- Rep Power
- 12
Re: office 2000 +office2003 shortcuts
Hi ITwombat thanks for the input mate
a.we deployed manually, so msi transforms a non-starter
b. hadn't thought about doing it on machine start up? i use redirected desktops would this still work? (i need to try i suppose)
c. Already thought of this one (checked the difference between installs, which is office and office11 this works well).
thanks again.
-
-
28th January 2007, 10:31 PM #5 Re: office 2000 +office2003 shortcuts
Another way would be to use the same shortcut for all desktops but make it point to a script which determines which version of office is installed - something like this should work.
set ofso=createobject("scripting.filesystemobject")
set oShell=createobject("wscript.shell")
if ofso.fileexists("c:\program files\microsoft office\office10\winword.exe") then oShell.run "c:\program files\microsoft office\office10\winword.exe"
if ofso.fileexists("c:\program files\microsoft office\office11\winword.exe") then oShell.run "c:\program files\microsoft office\office11\winword.exe"
-
-
29th January 2007, 09:45 AM #6 Re: office 2000 +office2003 shortcuts
I use a vbs on startup to set an environment variable called office that points to the location of the office installation and then the shortcut on their desktop for word would be %office%\winword.exe
We used to have 3 different versions of office, 2000, xp and 2003 and this worked fine now we only have 2003 so it's not required.
Ben
-
-
29th January 2007, 01:18 PM #7
- Rep Power
- 12
Re: office 2000 +office2003 shortcuts
hi chaps i managed to get the batch file to work, but have a slight problem in so much as it rembers that the shortcuts are there for each log on? can i get to only put the shortcuts there whilst logged on and then have them deleted on log off?
-
-
29th January 2007, 01:31 PM #8
- Rep Power
- 12
Re: office 2000 +office2003 shortcuts
have tried del /q "%userprofile%\desktop\*.*" before the copy commands which works ok but its a bit messy (the users can see the old shortcuts getting replaced).
-
-
29th January 2007, 02:49 PM #9
- Rep Power
- 14
Re: office 2000 +office2003 shortcuts
At my previous job I created a virtual link on each computer (scripted in the logon) which went something link this (not real code
)
sod it, I found the batch file I kept
Code:
if exist "c:\program files\Microsoft office\soffice" goto end
REM ***** Do checks for standard office files *****
REM ***** Check for Office 10 *****
if exist "c:\program files\Microsoft office\Office10\winword.exe" linkd "c:\program files\Microsoft office\soffice" "C:\Program Files\Microsoft Office\Office10"
REM ***** Check for Office *****
if exist "c:\program files\Microsoft office\Office\winword.exe" linkd "c:\program files\Microsoft office\soffice" "C:\Program Files\Microsoft Office\Office"
REM ***** Do checks for frontpage files *****
REM ***** Check for Office 10 *****
if exist "c:\program files\Microsoft office\Office10\frontpg.exe" linkd "c:\program files\Microsoft office\foffice" "C:\Program Files\Microsoft Office\Office10"
REM ***** Check for Office *****
if exist "c:\program files\Microsoft office\Office\fronpg.exe" linkd "c:\program files\Microsoft office\foffice" "C:\Program Files\Microsoft Office\Office"
REM ***** Do checks for publisher files *****
REM ***** Check for Office 10 *****
if exist "c:\program files\Microsoft office\Office10\mspub.exe" linkd "c:\program files\Microsoft office\poffice" "C:\Program Files\Microsoft Office\Office10"
REM ***** Check for Office *****
if exist "c:\program files\Microsoft office\Office\mspub.exe" linkd "c:\program files\Microsoft office\poffice" "C:\Program Files\Microsoft Office\Office"
:end
Now this might look complicated, but all it does is create a virtual folder c:\program files\Microsoft office\soffice where the necessary executables can be found regardless of the install. Therefore the shortcuts for any version just used the virtual folder.
(The publisher and frontpage virtual folders were because they seemed to like to have different homes!)
Note, the linkd virtual link is permenantly created as part of the ntfs volume and therefore only needs creating once per machine.
Hope this helps
-
-
30th January 2007, 06:37 PM #10
- Rep Power
- 12
Re: office 2000 +office2003 shortcuts
will this work with redirected desktops mate?
-
-
31st January 2007, 04:55 PM #11
- Rep Power
- 12
Re: office 2000 +office2003 shortcuts
do i need a linkd exe for this to work ?
-
-
1st February 2007, 12:54 PM #12
- Rep Power
- 14
Re: office 2000 +office2003 shortcuts
linkd.exe is part of one of the microsoft admin packs
It works with redirected desktop as the shortcut is the same no matter the machine, therefore, no complicated working out which office version is installed on a machine each time.
-
SHARE:
Similar Threads
-
By Silverman in forum How do you do....it?
Replies: 6
Last Post: 7th December 2007, 04:46 PM
-
By philtomo-25 in forum Scripts
Replies: 2
Last Post: 1st November 2007, 04:50 PM
-
By Geoff in forum Thin Client and Virtual Machines
Replies: 2
Last Post: 24th May 2007, 12:10 PM
-
Replies: 9
Last Post: 21st June 2006, 10:52 AM
-
By ChrisH in forum Office Software
Replies: 29
Last Post: 11th November 2005, 03:56 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules