Sign in to follow this  
Followers 0
wooying

Script won't run - Newbie

4 posts in this topic

I am trying to complie a script to run a office 2003 install for users who do not have local administrative rights to the server, the funny this is when I SyntaxCheckProd it comes back just fine. Can someone please tell me what I am going wrong. I am trying to run this script from a domain admin account and not the local admin account. Due to different workstations has different password. Which leads me to my second question, can I have two local administrator account running two different password in case the first one fails. Here the script I am trying to run.

;Declare all variables used

Dim $Username, $Password

; Initialization of the variables

$USERNAME = "administrator"

$Domain = "MYDOMAIN"

$Password = "DOMAINPASSWORD"

; Set the RunAs parameters to use domain adminstrator account

RunAsSet($Username, $domain, $Password)

$server_to_use = "SERVER"

$Microsoft_trigger = " TRANSFORMS=E2K3Office2003.MST /qb-"

$Office2003_comment = "Microsoft Office 2003"

$Office2003_path = "\Shares\Office2003\setup.exe"

$Office2003 = "\\" & $server_to_use & $Office2003_path & $Microsoft_trigger

Exit

Share this post


Link to post
Share on other sites

RunAsSet("Administrator", "MyDomain", "Password")

Run("\\Server\Share\Office2003\setup.exe")

Something like so is the basic syntax... I'm think all that other code you have is just some habitual stuff... functionality wise they are the same yes?

Was there something else i'm missing?

Share this post


Link to post
Share on other sites

RunAsSet("Administrator", "MyDomain", "Password")

Run("\\Server\Share\Office2003\setup.exe")

Something like so is the basic syntax... I'm think all that other code you have is just some habitual stuff... functionality wise they are the same yes?

Was there something else i'm missing?

Just so I am clear on this I have compile the script to look like this now:

;Declare all variables used

Dim $Username, $Password

; Initialization of the variables

$USERNAME = "administrator"

$Domain = "MYDOMAIN"

$Password = "DOMAINPASSWORD"

; Set the RunAs parameters to use domain adminstrator account

RunAsSet("administrator", "MYDOMAIN", "DOMAINPASSWORD")

$server_to_use = "SERVERNAME"

$Microsoft_trigger = " TRANSFORMS=E2K3Office2003.MST /qb-"

$Office2003_comment = "Microsoft Office 2003"

$Office2003_path = "\Shares\IT\Office2003\setup.exe"

$Office2003 = "\\" & $server_to_use & $Office2003_path & $Microsoft_trigger

Run("\\SERVERNAME\Shares\IT\Office2003\setup.exe")

Exit

AGAIN, sorry I just install AutoIT and now using it for the very first time. TIA

Share this post


Link to post
Share on other sites

;Declare all variables used
Dim $Username, $Password

; Initialization of the variables
$USERNAME = "administrator"
$Domain = "MYDOMAIN"
$Password = "DOMAINPASSWORD"
; Set the RunAs parameters to use domain adminstrator account
RunAsSet("administrator", "MYDOMAIN", "DOMAINPASSWORD")
$server_to_use = "SERVERNAME"
$Microsoft_trigger = " TRANSFORMS=E2K3Office2003.MST /qb-"
$Office2003_comment = "Microsoft Office 2003"
$Office2003_path = "\Shares\IT\Office2003\setup.exe"
Run("\\"&$server_to_use&$Office2003_path&$Microsoft_trigger)
Exit

Something like that if you feel that need. I thought doing without all the variables may simplfy it, but if you like them there it's perfectly fine.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0