bbbngowc Posted October 2, 2008 Posted October 2, 2008 Hello,here's the deal....I created a GP logon script to install Office 2007. The script works. Only problem now, is every time the computer restarts, the script runs and uninstalls office, then reinstalls office. How can I get this to stop? I want the script to install office, and the next time do not run.
IcemanND Posted October 2, 2008 Posted October 2, 2008 Add a check to the start of the script to check and see if it is already installed. if it is then exit the script if not continue on. You could look for a file that is installed like winword.exe, or check the installed applications list with WMI, or check for a registry setting.
bbbngowc Posted October 2, 2008 Author Posted October 2, 2008 I'm using the following line in the script, but it's not working.IF NOT EXIST "%ProgramFiles%\Microsoft Office\Office12\WINWORD.EXE" GOTO install ELSE GOTO endWhat's wrong with that?
IcemanND Posted October 2, 2008 Posted October 2, 2008 you should enclose the goto statements in parentheses.IF NOT EXIST "%ProgramFiles%\Microsoft Office\Office12\WINWORD.EXE" (GOTO install) ELSE (GOTO end)Another option is to get rid of the Else and put the goto end on a new line. Then if it gets past the If statement the script will always end.IF NOT EXIST "%ProgramFiles%\Microsoft Office\Office12\WINWORD.EXE" GOTO install goto End
bbbngowc Posted October 2, 2008 Author Posted October 2, 2008 Thanks I got it. I used two IF statements IF EXISTS GOTO INSTALLIF NOT EXISTS GOTO TO ENDYour way is more effient. Thanks.
bbbngowc Posted October 7, 2008 Author Posted October 7, 2008 I do have one more question.Why is it that unless the user has Admin permissions on the local computer the Application will not install? I have "Always Use Elevated Privileges" Enabled for both Computer and User Configuration.What else am I suppose to do to allow the application to install without giving the user admin rights?
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