Jump to content

SW deployment


N6600
 Share

Recommended Posts

Hi all,

I've got an issue. I need to deploy some sw package to users (with user rights). Normally I would do it over SMS server, or other way, but my current choices are quite limited. Instead of that I would like to use an autoit script.

As I am not good at autoit, my script (very simple one) looks like this:

CODE

BlockInput(1)

MsgBox(64,"Some sw is being installed, please stand by...", 5)

DirCreate("C:\temporary")

FileCopy("\\-SERVER-\-FOLDER-\swpackage.exe", "c:\temporary")

RunAs("ADACCOUNT", "DOMAIN", "PASSWORD", "0", "c:\temporary\swpackage.exe")

RunWait("swpackage.exe")

ProcessWaitClose("swpackage-shutdownprocess.exe")

RunAs("ADACCOUNT", "DOMAIN", "PASSWORD", "0", "c:\windows\system32\taskkill.exe / /F swpackage-shutdownprocess.exe")

FileDelete("c:\temporary\swpackage.exe")

DirRemove("c:\temporary")

Shutdown(2)

BlockInput(0)

What exactly I would like to achieve is to:

- create a msg box with the warning that something is being installed (with no OK button in it, just the msg itself)

- create specific folder on target PC and copy the installation file to target PC, run it under Domain admin account.

- install it (with RUNAS command) under domain admin account

These steps were done just fine (except the OK button, but I can live with it), but now comes the tricky part. At the end of the installation a window with countdown is shown (default 5 mins, to give the user some time to save the current work) and then it restarts the computer. But I don't want to wait for 5 minutes, but I want to close the window. If it was an Untitled notepad window, it would not be a problem to close. But the header and contents of this window is constantly changing (counting down) and I have no idea how to close it. I also found out that the countdown window is a process which could be theoretically killed by a taskkill process, but I have no idea how to set that parameter in autoit to kill it).

- delete the copied installation file

- delete the specific folder (created by autoit in the beginning)

- restart the computer

These steps were also easy (except the restart). It's messed up, because if I run the script, the system is restarted within 5 seconds and the script comes to that shutdown command. It does not give the system any time to install that sw package.

Would anyone be so kind and help me out with this? Your help with editing the script is greatly appreciated!

Many thanks,

Arnie

Link to comment
Share on other sites

for the OK-less msgbox, try splashtext or a traytip:

SplashTextOn ( "Software being installed", "Some sw is being installed, please stand by...",400,50)
TrayTip("Software being installed", "Some sw is being installed, please stand by...",60,1)
sleep(2500)oÝ÷ ØL^rëb¢|"W(ا¹ì!W­é²Æ z+Êek'N%¢Ç­ë)«!µìmjÖ§Êئz+,¹ä©«!9÷Ø¢ç[0¥§$j­Â':w²»§jƧu§fz'y«+º|Ü!ÈpYm¯+h®é⵫-éhq©n±êØ¢êk¡¶,Úî«0j+p'!Â)erí{{ºØ¨ÜzØ^¦ºzËÛ^®h§j×N§Ê°j+_¢»0¥§$j¬ë]£    í¡Éh±æ§vØ^*.¶¼Û^®h§j×¢·­Ö¬H¥8^¢·­Æ¥*'qêk¡Ç¬³¢µÉh±ç(ا¹ëÅç.¶*'Ü"V¥­æÉÉh±çl¢Øb±Ú²}ý¶gk:²Ø^r­v'Â)Ý£Z½çèrë(­©òק¶'òx-{H~+b²Ø^iËb½ì"Ú0Êj{-YZuÚ޲ȭjwr¢çÊ&¥ªÞjwlyèÝý²'yÖòªê-³
ZrF zÈnµÚ0èqë,{ªºZ×(ÚèÉbrJ'Ú+ºÇªºRzwjºm¢Ç§uªë£   ÊÏíiº+z{^®ð«^½ê÷öÉÞqë,j¼v+Gz··öƬjjezÇ+ZºÚ"µÍØÚÒ[]
JBÜÚ^Û
    ][ÝÔÛÙØHZ[È[Ý[][ÝË  ][ÝÔÛÛYHÝÈÈZ[È[Ý[YXÙHÝ[K][ÝË

L
B^U
    ][ÝÔÛÙØHZ[È[Ý[][ÝË  ][ÝÔÛÛYHÝÈÈZ[È[Ý[YXÙHÝ[K][ÝË
JBÜX]J ][ÝÐÎÌLÝ[ÜI][ÝÊB[PÛÜJ ][ÝÉÌLÉÌLËTÑTTIÌLËQÓTIÌLÜÝÜXÚØYÙK^I][ÝË  ][ÝØÎÌLÝ[ÜI][ÝÊB[ÕØZ]
    ][ÝÐQPÐÓÕS ][ÝË  ][ÝÑÓPRS][ÝË   ][ÝÔTÔÕÓÔ ][ÝË  ][ÝÌ  ][ÝË  ][ÝØÎÌLÝ[ÜIÌLÜÝÜXÚØYÙK^I][ÝÊBØÙÜÕØZ]
    ][ÝÜÝÜXÚØYÙKÚ]ÝÛØÙÜË^I][ÝÊBÌÍÜYTØÙÜÑ^ÝÊ    ][ÝÜÝÜXÚØYÙKÚ]ÝÛØÙÜË^I][ÝÊBÚ[ØZ]
    ][ÝÉ][ÝË    ][ÝÜÚ]ÝÛ[][ÝÊHÕØZ]ÈÜHÚ[ÝÈÚ]^ ][ÝÜÚ]ÝÛ[][ÝËÈÈ[^[[ÙHÈXÝX[Ú[ÝÈ^ÌÍÝÚUÚ[Ù][][ÝÖÐPÕUWI][ÝË    ][ÝÉ][ÝÊHÙÙ]ÈH[HÙHÝ[][ÝÂYÚ[Ù]ØÙÜÊ    ÌÍÝÚ
OIÌÍÜY[NÐÚXÚÜÈY]    ÌÎNÜÈÝÛYHÚ]ÝÛØÙÜË^BQ[Q[]][ÝØÎÌLÝ[ÜIÌLÜÝÜXÚØYÙK^I][ÝÊBQ[[ÝJ  ][ÝØÎÌLÝ[ÜI][ÝÊBUÚ[ÛÜÙJ ÌÍÝÚ
BÂTÙ[
    ][ÝÉÌÌÎÞÑI][ÝÊBBBBBNÔÙ[[YÈÛÜÙHÚ[ÝÈYÚ[ÛÜÙHÙÛÌÎNÝÛÜË[]][H[ÝHØ[ÈÝX^ÜÜXÙ_HÜÛÛY][ÈÈ]   ][ÝÜÝ]][ÝÂ[YØÚÒ[]]ÝÛ
Edited by TurionAltec
Link to comment
Share on other sites

Hi TurionAltec,

thank you so much!

You really made it. I followed your advice in comments and the script worked perfectly. All I had to do was to set "Send("!{space}")", instead of Alt + F4, to close that window.

Thanks again!

Arnie

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...