Jump to content











Photo
- - - - -

updating a script file attachment


  • Please log in to reply
16 replies to this topic

#1 darren rose

darren rose

    Frequent Member

  • Advanced user
  • 448 posts
  • Location:Norwich, Norfolk
  •  
    United Kingdom

Posted 18 October 2007 - 09:57 PM

Can someone advise me how to update an attachment in a .script file

For example, the stinger script doesn't contain the latest version, so I want to update it with the latest stinger download and replace it in the script?

Cannot seem to find any documentation on how to do it

Thanks

#2 powaking

powaking

    Frequent Member

  • Advanced user
  • 238 posts
  • Location:Fall River, MA
  •  
    United States

Posted 19 October 2007 - 12:05 AM

Can someone advise me how to update an attachment in a .script file

For example, the stinger script doesn't contain the latest version, so I want to update it with the latest stinger download and replace it in the script?

Cannot seem to find any documentation on how to do it

Thanks


Other than downloading it, removing the old version and adding the new one in you could try to do a web download but in the past McAfee like to change stingers name or the path to stinger quite a bit. You can experiment though.

Could also have the script execute wget as I think wget has the option to only download if there is a newer version. As for having it automatically add the newest one into the script it might be possible but I'm too much of a noob for that :cheers:

#3 darren rose

darren rose

    Frequent Member

  • Advanced user
  • 448 posts
  • Location:Norwich, Norfolk
  •  
    United Kingdom

Posted 19 October 2007 - 12:26 AM

Other than downloading it, removing the old version and adding the new one in you could try to do a web download but in the past McAfee like to change stingers name or the path to stinger quite a bit. You can experiment though.

Thanks powaking, but my problem is that like in the stinger script, the outdated stinger.exe is embedded in the script, I can obviously download the latest one but how do I embed it in the script?

#4 powaking

powaking

    Frequent Member

  • Advanced user
  • 238 posts
  • Location:Fall River, MA
  •  
    United States

Posted 19 October 2007 - 12:45 AM

Thanks powaking, but my problem is that like in the stinger script, the outdated stinger.exe is embedded in the script, I can obviously download the latest one but how do I embed it in the script?


Hm ok there is an Encode command in the script so just thinking real quick you can have the script extract the file to a temp directory, do a wget to see if there is a new version. If there is it will download and then have it encode it back into the script. Of course you will need to have the script get the file version of the currently attached file so it can do a compare with what wget downloads.

Thats just thining out loud, maybe if I think more or maybe someone else has a better idea there might be a better solution.

#5 online

online

    Silver Member

  • Advanced user
  • 767 posts

Posted 19 October 2007 - 05:48 AM

@ darren rose

If it is only one (or two) and relatively small file you could do as following, otherwise it would be better re-encode the whole script and after replacing [Main] and other no-encoding-related sections:

1. in this example "fxdecod1.dll" is the file that we want replace (please, see screenshots);
2. encode the new file separately (I hope you know how, if not just ask again);
3. open the script with old file and replace first of all 64 lines (in this case, 64) of old "fxdecod1.dll" with new ones;
4. then replace also (it's very important) "fxdecod1.dll" old proprerties (size) with those that you read in its new "Encoded folder" (the name of encoded folder can change, probably you would find "Folder").
5. Save the script before close it (both in WB or in your text editor).

That's all! :cheers:




By the way: you can do all this with WB (better) using "Edit > Source" function or just with any text (WordPad for this job is better than Notepad) editor (a bit more difficult, because of further accuracy is needed).

Attached Thumbnails

  • 1.png
  • 2.png


#6 Garfield

Garfield

    Member

  • .script developer
  • 96 posts
  • Interests:pretty much everything
  •  
    South Africa

Posted 19 October 2007 - 07:37 AM

Maybe this will help..

It is a script that was started by Nuno for AD-Aware that does its own updating...

Attached File  Ad_AwareSE.Script   2.99MB   336 downloads

Note the [Update] section.

Enjoy... :cheers:

#7 NightMan

NightMan

    Frequent Member

  • .script developer
  • 433 posts
  • Location:Russian, Moscow

Posted 19 October 2007 - 08:52 AM

Scripts updating

Unpack - extract program files from script, example: "Unpack,Folder,AngelWriter.7z,True" - first option (Folder) - directory in script with archives; second parameter (AngelWriter.7z) - archive name; third option (in this case " True ") is used only in self extracting archives (files with exe extension), and used as a parameter start, otherwise ignored. If a directory with the script contain folder with the same name as the output folder (%ProgramFolder%), and it is a file named Programme (% ProgramEXE%), is not extracting archive of the script, and copying files from this folder, it is done for facilitate configuration and maintenance program without making immediate changes in the script.
Also possible advanced usage of this function with directive to target folder and program executable (need for check extracting process), example:
"unpack,Files,%ProgramArchive%,,%target_win%,System32".
Brief description of the parameters:
"Unpack,[Folder],[Archive zip rar 7z and some exe],[True],[%Target_Prog%],[%ProgramFolder%],[%programExe%]"
For extracting archive we use "7z.exe", latest version support 7z, zip, rar and other archive formats.


http://www.vistape.n...istape-api.html

or you can extract archive, update it and include back to script :cheers:

#8 darren rose

darren rose

    Frequent Member

  • Advanced user
  • 448 posts
  • Location:Norwich, Norfolk
  •  
    United Kingdom

Posted 19 October 2007 - 08:58 AM

Thank you all, will have a play about with what you have said and see how I get on!!

#9 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 19 October 2007 - 09:25 AM

Why so complicated?
  • In WinBuilder with the script selected, go to edit mode
  • Click the 'Attachments' tab
  • Click the Folder list in the middle pane, one by one until in the right pane the 'old' file is seen
  • Click 'Add' in the left pane
  • Click the 'Add' button, navigate to the 'new' file and double click it.
  • Click the 'Start' button
  • Click 'OK'
The 'old' file is overwritten by the 'new' one.

Peter

#10 darren rose

darren rose

    Frequent Member

  • Advanced user
  • 448 posts
  • Location:Norwich, Norfolk
  •  
    United Kingdom

Posted 19 October 2007 - 12:05 PM

Why so complicated?

  • In WinBuilder with the script selected, go to edit mode
  • Click the 'Attachments' tab
  • Click the Folder list in the middle pane, one by one until in the right pane the 'old' file is seen
  • Click 'Add' in the left pane
  • Click the 'Add' button, navigate to the 'new' file and double click it.
  • Click the 'Start' button
  • Click 'OK'
The 'old' file is overwritten by the 'new' one.

Peter


Thanks Peter didn't know it was so simple, hence why I asked hoping for a great simple reply like yours! cheers!

#11 powaking

powaking

    Frequent Member

  • Advanced user
  • 238 posts
  • Location:Fall River, MA
  •  
    United States

Posted 19 October 2007 - 12:33 PM

Thanks Peter didn't know it was so simple, hence why I asked hoping for a great simple reply like yours! cheers!


:cheers:

And here I was thinking you wanted the script to check for an updated file on the website download, encode it back into the script and then process. Didn't know thats all you wanted to do. :cheers:

#12 darren rose

darren rose

    Frequent Member

  • Advanced user
  • 448 posts
  • Location:Norwich, Norfolk
  •  
    United Kingdom

Posted 19 October 2007 - 02:30 PM

:cheers:

And here I was thinking you wanted the script to check for an updated file on the website download, encode it back into the script and then process. Didn't know thats all you wanted to do. :cheers:

well maybe I will look at that next as would be handy especially for spybot to have a plugin which updates itself before you build but for now just wanted to know how to manually update ones like stinger (not many new versions released so not as if it needs doing too often!)

Thanks again

#13 powaking

powaking

    Frequent Member

  • Advanced user
  • 238 posts
  • Location:Fall River, MA
  •  
    United States

Posted 19 October 2007 - 03:05 PM

Maybe this will help..

It is a script that was started by Nuno for AD-Aware that does its own updating...

Attached File  Ad_AwareSE.Script   2.99MB   336 downloads

Note the [Update] section.

Enjoy... :cheers:


Haven't tried but does this work in VistaPE?

#14 darren rose

darren rose

    Frequent Member

  • Advanced user
  • 448 posts
  • Location:Norwich, Norfolk
  •  
    United Kingdom

Posted 19 October 2007 - 03:20 PM

Haven't tried but does this work in VistaPE?

Yes the script mentioned by garfield seems to work okay under vistape!

#15 powaking

powaking

    Frequent Member

  • Advanced user
  • 238 posts
  • Location:Fall River, MA
  •  
    United States

Posted 19 October 2007 - 03:47 PM

Yes the script mentioned by garfield seems to work okay under vistape!


Try this. Clicking on the download button will download stinger, compress it to 7z and encode it back into the script.

It won't check if its newer hence the button to do it.

Attached File  McAfeeStinger.script   2.44MB   610 downloads

#16 darren rose

darren rose

    Frequent Member

  • Advanced user
  • 448 posts
  • Location:Norwich, Norfolk
  •  
    United Kingdom

Posted 19 October 2007 - 04:07 PM

Try this. Clicking on the download button will download stinger, compress it to 7z and encode it back into the script.

It won't check if its newer hence the button to do it.

Attached File  McAfeeStinger.script   2.44MB   610 downloads

Excellent thanks powaking, works like a dream!!!

That's adaware and stinger sorted just need to find one that autoupdates spybot script now!!!

#17 powaking

powaking

    Frequent Member

  • Advanced user
  • 238 posts
  • Location:Fall River, MA
  •  
    United States

Posted 19 October 2007 - 05:29 PM

Excellent thanks powaking, works like a dream!!!

That's adaware and stinger sorted just need to find one that autoupdates spybot script now!!!


And here is Avast scanner updated too.

Attached File  AvastScanner.script   504.82KB   289 downloads




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users