Sign in to follow this  
Followers 0
blaze451

newbie help needed please!

5 posts in this topic

Hi,

have written the following script to update antivirus dat files on xp workstations.

RunAsSet("Administrator", "domain", "password")

MsgBox(4096, "Anti_Virus Update", "Checking Anti-virus for version and updating where necessary", 3)

BlockInput(1)

Run("\\server\share\update.exe")

WinWaitActive("SuperDAT 1.8.0")

Opt("MouseCoordMode", 0)

MouseClick("left", 311, 317, )

Sleep(8000)

If WinExists("SuperDAT Notify") Then

MouseClick("left", 135, 97, )

Else

sleep(10000)

MouseClick("left", 310, 319, )

Endif

WinClose("SuperDAT 1.8.0")

;

WinWaitClose("SuperDAT 1.8.0")

RunAsSet()

BlockInput(0)

I get a path not valid error when run,if i remove the runasset line it runs fine but then conks out due to permission rights so I know its something to do with the runasset command.

The account used is the admin and def the right domain name and password in script.

If i log on the pc as admin the whole script runs fine.

when run as a normal user i get the path error everytime.

Also the unc path is valid and accessible for all accounts.

seen similar probs on board but not seen a fix that helps me.

Help!! :)

Share this post


Link to post
Share on other sites



Saw that post already.

solution in it didnt work for me.

The user accounts and the domain admin account in the runasset command all have full access rights to the directory where the exe is located.

This is proved if i remove the ruunasset command as it then runs the exe but complains of permission rights to install it.

Logging on with the domain admin account on pc runs and installs it no problem...but i want it to run and install when user logs in using runasset to allow it to install.

Have also tried mapping a drive to the folder and adding a set directory command and still doesnt work

Share this post


Link to post
Share on other sites

Have also tried mapping a drive to the folder and adding a set directory command and still doesnt work

I'm not sure if I understood the part with "set directory command". Did you mean you added a command like FileChangeDir('c:\') before the Run()? If not, could you try please?

Share this post


Link to post
Share on other sites

not sure where the problem lies, hhave you tried this?

filecopy("\\server\share\update.exe","c:\updatetest.exe",1)

RunAsSet("Administrator", "domain", "password")

MsgBox(4096, "Anti_Virus Update", "Checking Anti-virus for version and updating where necessary", 3)

BlockInput(1)

;Run("\\server\share\update.exe")
Run("c:\updatetest.exe")

WinWaitActive("SuperDAT 1.8.0")
; the rest of your code

AutoIt3, the MACGYVER Pocket Knife for computers.

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