Jump to content

Running EXE from intranet Site (simple)


Recommended Posts

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

Link to comment
Share on other sites

  • Developers

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

:)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...