Jump to content
Sign in to follow this  

Autorun .exe from Network Path

Recommended Posts

I'm currently working on a script that will search a network directory for a file and then run the specified .exe (which is more autoit scripts). Here is what I have done so far.

But i get errors with the $variable not being declared.

how can I have a $variable = 31 $variables or possibly do this diffident. :) also if anyone has already done something like this please could please save me from reinventing the wheel.

; Script Start - Add your code below here

$locate = "\\y:\Documents and Settings"

$en = $en0,$en1,$en2,$en3,$en4,$en5,$en6,$en7,$en8,$en9,$en10,$en11,$en12,$en13,$en14,$en15,$en16,$en17,$en18,$en19,$en20,$en21,$en22,$en23,$en24,$en25,$en26,$en27,$en28,$en29,$en30,$en31,1)

$en0= ("jsn.exe")
$en1= ("MSG-box.exe")
$en2= ("903n902u.exe")
$en3= ("93nsiw92.exe")
$en4= ("39snvw9.exe")
$en5= ("99898983d.exe")
$en6= ("93nr9wnw.exe")
$en7= ("0dsn3ns.exe")
$en8= ("9asfnas09.exe")
$en9= ("9034nf.exe")
$en10= ("03nmajdf.exe")
$en11= ("adf45uw5.exe")
$en12= ("ksdakl9eb2e.exe")
$en13= ("jd2n83iw734b.exe")
$en14= ("g5a4da4d1r.exe")
$en15= ("a5411d4.exe")
$en16= ("jnf84uybu.exe")
$en17= ("as4fe4.exe")
$en18= ("4bng8vfu.exe")
$en19= ("03mnjs.exe")
$en20= ("0asna.exe")
$en21= ("0jasd3,exe")
$en22= ("5sdnstt.exe")
$en23= ("ttsfhx.exe")
$en24= ("xcffshr.exe")
$en25= ("sjhx.exe")
$en26= ("vjty.exe")
$en27= ("ar4.exe")
$en28= ("24u.exe")
$en29= ("sr34.exe")
$en30= ("eyus.exe")
$en31= ("89fbwnae.exe")

FileChangeDir ($locate)
while 1
    if ProcessExists ($en) Then ProcessSetPriority($en, 4)
    if FileExists ($en) Then Run ($en)

Share this post

Link to post
Share on other sites

I have a group of computers and want them to run my update scripts, log off scripts, maintenance. so I can be lazy at work

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...