Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Runas code

Status
Not open for further replies.

Lordmathos

IS-IT--Management
Oct 21, 2005
243
GB
hi all im trying to create a script for users to run to allow them to install an important update onto their computers.

The users have had all privilages removed.

Im not very good at scripting so I need the script to run a specific file as administrator with the username and password already entered
 
I you could tell me some more about you're environment and what you're going to deply, I might point you in another direction. Runas form a script exposes one important security issue, user/pass in clear text. The solution dm4ever provides, remedies this issue a bit, because the utility he suggest you to use is actually launched by you.

Since you are running best practice, and removed all users privileges I assume you have a couple of tools to support this scenario. If you provide me with some basics, I might give you a hint on an alternativ way of deploying it.

Some important info :
Domain or not? If domain, higher than NT4.0?
What kind of security update, Microsoft or 3rd party?
Update format exe or msi? If exe, can it be deployed silent?
Client computer OS?
 
Basically i am trying to roll out an update for office 2003. (we dont use automatic updates or wsus yet but are looking into it) The users have very basic rights and I would like to roll out the update via a link for them to install themselves.

The users dont have the rights to install the update so i was looking at creating a script with a temporary username and password in it with admin rights or an alternative method of distribution.

We have about 150 computers spread throught the country so it is not possible to visit them all.

 
if its an msi i am sure you can start it with admin rights from the command line, thats one of the big shouts about why msi's rule
 
do you have an installation service? sms or the such like
 
no unfortunately not. all we have is server 2003 and xp sp2 clients
 
i know it doesnt help you for now and the pxsec or WMI connection is prob you best bet, perhaps JadeKnight has some good steering..but in the long run i would try and get an installation service on the client which has elevated priv, not sure if RIS has this and is free??
 
Four suggestions:

1) Microsoft's own Script Encoder (see Just be aware that VBE scripts encoded with it can be easily decoded.

2) RunAsUser - a utility from a Tek-Tips contributor - Greg Palmer - that can encrypt VBS scripts (see
3) AutoIt - a basic scripting language that can be used to create 'RunAs' scripts then compile them into executables (see
4) AutoHotkey - another basic scripting language that can be used to create 'RunAs' scripts then compile them into executables (see
I've used them all to create scripts that use RunAs.

Hope this helps...
 
In the time it would take to come up with a solution to deploy an update for Office, you could have a WSUS server up and running. It's an easy rollout. Shouldn't take more than a couple hours to install, configure, figure it out and have all computers reporting to it.

Hope This Helps,

Good Luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top