Sign in to follow this  
Followers 0
wooying

Running EXE from intranet Site (simple)

4 posts in this topic

All

I am trying to run a EXE from one of our intranet site, what I am trying to do is have them login in the morning and have the GPO run the script so that when they come in the morning they will be force to up their systems. And some systems do not have administrative right so I have to include a domain service account to run, which will not allow them to login with that account. Here what I have so far

#include <String.au3>

;Declare all variables used

Dim $Username, $Password

; Initialization of the variables

$USERNAME = "localserviceaccount"

$Domain = "mydomain"

$Password = "password"

; Set the RunAs parameters to use domain adminstrator account

RunAsSet($USERNAME, $Domain, $Password)

$Comment = "Updating for CRM in process"

Run("http://nameoftheintranetserver/update.exe")

End

Can anyone tell me what I am doing wrong? TIA

Share this post


Link to post
Share on other sites



you will have to download the "http://nameoftheintranetserver/update.exe" with InetGet and save it to @Temp after which you can run it.

I also wouldn't use a Domain account but use a Local PC account with Admin rights to the PC .. not the Domain ..

Jos

:)


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

you will have to download the "http://nameoftheintranetserver/update.exe" with InetGet and save it to @Temp after which you can run it.

I also wouldn't use a Domain account but use a Local PC account with Admin rights to the PC .. not the Domain ..

Jos

:)

Jos, thanks but here the thing this EXE require a administrator account to run, some users do not have Power Users rights or higher. That is why I need to run to EXE with some sort of admin rights. Thanks

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Jos, thanks but here the thing this EXE require a administrator account to run, some users do not have Power Users rights or higher. That is why I need to run to EXE with some sort of admin rights. Thanks

I understand ... We deal with the same situation at work...

We have a Local PC account in each PC that has Admin rights.

So the scrip looks like:

If InetGet("http:...", @TempDir & "\myfiler.exe",1) then 
    RunAsSet("LocalAccount",@ComputerName,"Password")
    Run(@TempDir & "\myfiler.exe",@TempDir)
Else
; Download failed
EndIf

Jos

:)

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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