Jump to content

problem implementing desktop shortcuts


Recommended Posts

Posted

Hi all, we use redirected desktops, but we also have a hybrid MS office setup with 2000 and 2003, i have with help created a script which will locate a file on the local drive and then copy shortcuts to the desktop acordingly depending on Office version.

 

my problem

 

The script runs ok with no errors (i even put a pause to check the shortcuts were being copied) , the shortcuts appear in the c:\documents and settings\%userprofile%\desktop folder, and the users roaming profile folder but the users can't actually see them on the desktop ????

 

what am i missing.

 

Incidentally i tried to get the script to work at machine switch on via Gpo so if any one can help there to i'd appreciate it

Posted

If you are using redirected desktops, you don't actually see the desktop folder from the local machine.

 

You would be better off changing your script so that the office icons point to scripts, launching whichever version is installed.

Posted
With redirected desktops you can have it merge with the all users desktop if I remember correctly. Check it out its in the redirected folders bit of AD.
Posted

If its just office apps then this may be of help. Its a small script which I wrote which launches a office bar type prog. A snapshot of the what appears is at the bottom of the script:

 

; AutoIt Version: 3.2.0.1

; Language: English

; Platform: WinXP

; Author: Matt Marsh

; Script Function: Office Bar

; Version: 1 Beta

; Date: Oct 2006

 

#include

 

GUICreate("Office Bar", 171, 51, 570, 40)

GUISetBkColor(0x0066FF)

$Icon_1 = GUICtrlCreateIcon("C:\Program Files\Microsoft Office\OFFICE11\winword.exe", 0, 10, 10, 32, 32)

GUICtrlSetTip(-1, "Launch Word")

$Icon_2 = GUICtrlCreateIcon("C:\Program Files\Microsoft Office\OFFICE11\excel.exe", 0, 50, 10, 32, 32)

GUICtrlSetTip(-1, "Launch Excel")

$Icon_3 = GUICtrlCreateIcon("C:\Program Files\Microsoft Office\OFFICE11\powerpnt.exe", 0, 90, 10, 32, 32)

GUICtrlSetTip(-1, "Launch Powerpoint")

$Icon_4 = GUICtrlCreateIcon("C:\Program Files\Microsoft Office\OFFICE11\mspub.exe", 0, 130, 10, 32, 32)

GUICtrlSetTip(-1, "Launch Publisher")

 

GUISetState()

While 1

$bpress = GUIGetMsg()

Select

Case $bpress = $Icon_1

Run("C:\Program Files\Microsoft Office\OFFICE11\winword.exe")

Case $bpress = $Icon_2

Run("C:\Program Files\Microsoft Office\OFFICE11\excel.exe")

Case $bpress = $Icon_3

Run("C:\Program Files\Microsoft Office\OFFICE11\powerpnt.exe")

Case $bpress = $Icon_4

Run("C:\Program Files\Microsoft Office\OFFICE11\mspub.exe")

 

 

EndSelect

WEnd

Exit

 

What it looks like:

 

http://img112.imageshack.us/img112/1395/bargz4.jpg

 

[ User just clicks on what prog to launch ]

Prog runs after users logon - can be controlled via a policy if need be.

 

Feel free to edit and change anything.....

Posted

No problem, I was going to stick it on my FTP site for you this evening but it seems you have sorted this already - thats good.

Hope it helps.

Posted

You could put some nested 'If' statements in which point to a specific exe I suppose, so depending on what 'If' statement is correct in regard to the exe then it will do what you tell it. [ Say fire off the relevant office app ]

Just keep that part of the script looping until the condition is met. Should be straight forward...

Posted

If FileExists ("c:\program files\microsoft office\office")Then

 

got this so far but don't how to get it to either call the gui create office 2000 part or if not exist goto another part of the script.

can you help?

Posted

Just had a quick think about this, what I would do is check at the start of the script what ver of office you are running with an 'If' statement, then if the statement is true, follow on with the Gui Create. If the statement is not true, [ Else ] then make a new Gui Create with the relevant run paths.

So what you will have is two sets of code.

In a nut shell depending on what it finds when the script is first run, depends on what GUI is displayed with the relevant run paths.... Hope that makes sense.

I don't have office 2000 so I don't know the relevant exe or paths.

Should be straight forward.

Sorry for not replying sooner, been a bit busy lately playing with Wild fire IM and getting that working....Plus I have been re-writing some of my older scripts and updating them.

Posted
Hi matt i have decided to call it from a batch login script , i created a office 2000 version and used if statements in the batch file (i'm more familiar with them). Have added to login scripts today and will let you know what reaction, problems i run into.
  • 3 weeks later...
Posted
Mat ethis works perfectly i have also passed it on(with full credit given to you) to another forum member who was as delighted as i was with it. Thanks again Matt

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...