Uraken Posted January 30, 2007 Posted January 30, 2007 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
Ric_ Posted January 30, 2007 Posted January 30, 2007 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.
Uraken Posted January 30, 2007 Author Posted January 30, 2007 ok mate will look at this then, i think the chaps in the scripting forum mentioned some ideas for a similar problem
Mr_T Posted January 31, 2007 Posted January 31, 2007 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.
mattx Posted February 1, 2007 Posted February 1, 2007 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.....
Mr_T Posted February 1, 2007 Posted February 1, 2007 no can't see anything that says merge? Sorry my mistake the setting is with Ranger not AD :-)
Uraken Posted February 6, 2007 Author Posted February 6, 2007 matt i got the script thanks mate, i manged to convert it to office 2000 and it works well cheers for your help mate.
mattx Posted February 6, 2007 Posted February 6, 2007 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.
Uraken Posted February 7, 2007 Author Posted February 7, 2007 i'm wondering how i can get it to check which version of office exists and provide the shortcuts accordingly though?
mattx Posted February 7, 2007 Posted February 7, 2007 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...
Uraken Posted February 7, 2007 Author Posted February 7, 2007 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?
mattx Posted February 7, 2007 Posted February 7, 2007 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.
Uraken Posted February 8, 2007 Author Posted February 8, 2007 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.
mattx Posted February 8, 2007 Posted February 8, 2007 will let you know what reaction, problems i run into. Hopefully not any !!
Uraken Posted March 1, 2007 Author Posted March 1, 2007 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
mattx Posted March 1, 2007 Posted March 1, 2007 No problem - glad to know others find it handy. Thanks for letting me know, its nice to get good feedback.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now