updating office via script
#1
Scooby Regular
Thread Starter
Join Date: Apr 2004
Location: Cardiff
Posts: 1,928
Likes: 0
Received 0 Likes
on
0 Posts
updating office via script
I am trying to get a script to run in my place that updates office 2003 . The users dont have local admin rights and are restricted by a group policy which prevents them from changing the registry, background etc. I know this can be done via AD and msi files but they wont do it and i dont have domain admin rights . This is what i have so far, this will be called from the standard users script.
What we need to know is how do we install it as administrator using the run as command. How do you enter the password without having a user to input it? Any help would be appreciated.
rem Do you wish to insatll the office updates?
rem If not press Ctrl+C to quit
Pause
@echo off
runas /noprofile /user:localhost\administrator PasswordXXXX (i think this is the bit thats wrong)
@echo on
net localgroup "administrators" domain\security group /add
net use o: \\server\path\support\office03\updates
\\server\path\support\office03\updates\sp1.exe /q (service pack1)
\\server\path\support\office03\updates\update.exe /q (update)
Shutdown -r -t 360 (shuts machine down)
What we need to know is how do we install it as administrator using the run as command. How do you enter the password without having a user to input it? Any help would be appreciated.
rem Do you wish to insatll the office updates?
rem If not press Ctrl+C to quit
Pause
@echo off
runas /noprofile /user:localhost\administrator PasswordXXXX (i think this is the bit thats wrong)
@echo on
net localgroup "administrators" domain\security group /add
net use o: \\server\path\support\office03\updates
\\server\path\support\office03\updates\sp1.exe /q (service pack1)
\\server\path\support\office03\updates\update.exe /q (update)
Shutdown -r -t 360 (shuts machine down)
Last edited by mike1210; 22 February 2005 at 01:19 PM.
#2
Scooby Regular
Originally Posted by mike1210
I am trying to get a script to run in my place that updates office 2003 . The users dont have local admin rights and are restricted by a group policy which prevents them from changing the registry, background etc. I know this can be done via AD and msi files but they wont do it and i dont have domain admin rights . This is what i have so far, this will be called from the standard users script.
What we need to know is how do we install it as administrator using the run as command. How do you enter the password without having a user to input it? Any help would be appreciated.
rem Do you wish to insatll the office updates?
rem If not press Ctrl+C to quit
Pause
@echo off
runas /noprofile /user:localhost\administrator PasswordXXXX (i think this is the bit thats wrong)
@echo on
net localgroup "administrators" domain\security group /add
net use o: \\server\path\support\office03\updates
\\server\path\support\office03\updates\sp1.exe /q (service pack1)
\\server\path\support\office03\updates\update.exe /q (update)
Shutdown -r -t 360 (shuts machine down)
What we need to know is how do we install it as administrator using the run as command. How do you enter the password without having a user to input it? Any help would be appreciated.
rem Do you wish to insatll the office updates?
rem If not press Ctrl+C to quit
Pause
@echo off
runas /noprofile /user:localhost\administrator PasswordXXXX (i think this is the bit thats wrong)
@echo on
net localgroup "administrators" domain\security group /add
net use o: \\server\path\support\office03\updates
\\server\path\support\office03\updates\sp1.exe /q (service pack1)
\\server\path\support\office03\updates\update.exe /q (update)
Shutdown -r -t 360 (shuts machine down)
Plus, perhaps more importantly, the runas can't take the password as a parameter - a 30 second Google turns up this which would seem to be useful.
So, you'd end up with a command/batch containing:
CPAU -u Administrator -p passwordXXXX -ex Update.bat
And Update.bat would contain
@echo on
net localgroup "administrators" domain\security group /add
net use o: \\server\path\support\office03\updates
\\server\path\support\office03\updates\sp1.exe /q (service pack1)
\\server\path\support\office03\updates\update.exe /q (update)
Shutdown -r -t 360
Incidentally depending on how you work it, punters with a bit of nouse would be able to get your admin password from the plain text batch file; which may not be the best.... There are various tools which can disguise the contents of a batch file.
Last edited by Miles; 23 February 2005 at 08:21 PM.
#4
Scooby Regular
Thread Starter
Join Date: Apr 2004
Location: Cardiff
Posts: 1,928
Likes: 0
Received 0 Likes
on
0 Posts
Hi miles thanks for the reply
drive needs to be mapped as both the service pack and the patch are on a server which brings up a valid point as the staff dont have access rights to it doh, ill have to move it . At the moment i log in to the staffs pc and it brings down the updates that way as ive added a similar script into my login scipt. We have put a pause allowing us to cancel the script if the updates are already done on the machine. A bit of a potchy way to do it i admit, but i can do it on a few machines at a time and dont need any cd's or anything on me. cheers for the link too
drive needs to be mapped as both the service pack and the patch are on a server which brings up a valid point as the staff dont have access rights to it doh, ill have to move it . At the moment i log in to the staffs pc and it brings down the updates that way as ive added a similar script into my login scipt. We have put a pause allowing us to cancel the script if the updates are already done on the machine. A bit of a potchy way to do it i admit, but i can do it on a few machines at a time and dont need any cd's or anything on me. cheers for the link too
Thread
Thread Starter
Forum
Replies
Last Post
An0n0m0us
Computer & Technology Related
0
28 September 2015 09:58 PM
MightyArsenal
Wheels, Tyres & Brakes
6
25 September 2015 08:31 PM
JackClark
Computer & Technology Related
3
18 September 2015 11:19 PM