Need help with logon script
We have windows 2003 server and all clients are using XP computers with office 2003. Now we have added 2 windows 7 computers with office 2010. For the XP/2003 users we have a script that create their outlook profile automatically once they log in (richprofile)开发者_如何学Go. This script dose not work with windows7/2010. I need to check if the OS windows 7, then not execute the richprofile command and if it is windows XP, then excute it. Can someone help? here is the BAT file
@echo off
\\myserver\ClientApps\RichProfile.exe exchangeserver %UserName% outlook N D
start dc.vbs
exit
So if windows 7 it should be
@echo off
start dc.vbs
exit
and if windows xp, it should be
@echo off
\\myserver\ClientApps\RichProfile.exe exchangeserver %UserName% outlook N D
start dc.vbs
exit
Thanks
This is a DOS .bat file question rather than a vbscript question. Take a look at this script, it comprehensively identifies all windows versions and allows version-based command execution.
Copy the script then find the :ver_xp
label and add your XP command under it. Similarly, locate the :ver_7
label and add Windows 7 command under it. Finally, save and run the file.
RichProfile works fine for me on Windows7 with Office 2010, not sure what your problem is, they have a new version 5 beta you can get on soon as well that looks like it does some cool stuff, you can get on the beta here www.richprofile.com
To do exactly what you're asking try using the following script. Abbas' answer includes a link to an example script to do more extensive version checking but this one is much more simple and should work well for your purpose.
@echo off
ver | find "6.1" > nul
if not errorlevel 0 (
\\myserver\ClientApps\RichProfile.exe exchangeserver %UserName% outlook N D
)
start dc.vbs
exit
精彩评论