Jump to content

Recommended Posts

Posted

I currently have a batch file and a vbs script along with 2 .exe files that I would like to turn into one file. I was thinking that a .exe would accomplish this.

The basis of this is for when my unattended install is complete I would like to ensure that the Event log is cleared, Temp folders are emptied, and the recycling bin is also emptied.

I already have all the scripts to do this written but would like to combine the 4 files into a .exe so that I only have one file to call in the script.

Any Idea's?


Posted

It would prbably be eaisier just to make a batch file that runs all that stuff, along with the other batch file. This would be much easier than to make an .exe, Give it a try!! :thumbup

Posted (edited)
I currently have a batch file and a vbs script along with 2 .exe files that I would like to turn into one file. I was thinking that a .exe would accomplish this.

The basis of this is for when my unattended install is complete I would like to ensure that the Event log is cleared, Temp folders are emptied, and the recycling bin is also emptied.

I already have all the scripts to do this written but would like to combine the 4 files into a .exe so that I only have one file to call in the script.

Any Idea's?

CleanUp :thumbup

This utility consists of two parts: a (32 bits) console application and a graphical

user interface.

Purpose:

Deletes temporary internet files, cookies, files in temp and tmp, log files,

dump files, clears IE history, recent documents list, recycle bin, eventlogs,

explorer search history, dll cache and prefetch directory.

After install of CLEANUP.MSI, save %SystemRoot%\System32\cleanup.exe in a safe place. It's the (32 bits) console application you will use.

type cleanup /? to view switches available for UA install.

Edited by Bilou_Gateux
Posted

I think AutoIT would be your best bet...that's what I use as of late.

AutoIT is a scripting tool that has some really sweet GUI handlers...there's about a ton of info on that elsewhere.

What I do, and what you might want to do, is use AutoIT to create a script and then turn that script into an .exe. I'll show you a little script:

install.au3

DirCreate ( @ProgramFilesDir & "\Newsbin" )

FileCopy ( @ScriptDir & "\nbpro.exe", @ProgramFilesDir & "\Newsbin" )

DirCreate ( @ProgramFilesDir & "\Newsbin\plugins" )

FileCopy ( @ScriptDir & "\BNS.dll", @ProgramFilesDir & "\Newsbin\plugins" )

FileCopy ( @ScriptDir & "\NZB.dll", @ProgramFilesDir & "\Newsbin\plugins" )

FileCopy ( @ScriptDir & "\PARFILTER.dll", @ProgramFilesDir & "\Newsbin\plugins" )

FileCreateShortcut ( @ProgramFilesDir & "\Newsbin\nbpro.exe", @ProgramsCommonDir & "\Newsbin.lnk" )

The functions are pretty easy to figure out, and the variables are very handy in relation Unattended Windows setup. The script above basically creates a folder, copies some files into it, and then makes a shortcut. I then compile that script into an .exe. This .exe alone will only perform the functions, and does not contain the actual files referenced in the script.

But that's not a problem if you take it a step further...you can use the 7zip SFX tutorials to combine the AutoIT .exe and any other files into a single .exe. That .exe, when run, will run the AutoIT .exe, which in turn runs the script you setup. And of course all your other files are included.

Check out this post that I started, it pretty much lays it all out in the last post I made. I know it sounds funky but it's not:

http://www.msfn.org/board/index.php?showtopic=52981

Enjoy!

Posted

just to add my 2 cents

you could create a batch file that runs all of your scripts, and create a SFX archive that extracts to a temp folder and runs the batch.

Posted

That's what I used to do, and my method above is just an advanced version of that. I never liked how the CMD window would appear, and even with CMDOW you would still get the initial flash.

Posted

Have you ever thought of a VBS file to do all the work.

You can have all your action in there.

Examble

This will start the CleanMgr.exe and clean all Local Hard drive

You could also add more action to this.

Save as cleanmgr99.vbs

CreateObject("Wscript.shell").run ("cleanmgr /sagerun:99"),1 , True
Posted
I currently have a batch file and a vbs script along with 2 .exe files that I would like to turn into one file. I was thinking that a .exe would accomplish this.

The basis of this is for when my unattended install is complete I would like to ensure that the Event log is cleared, Temp folders are emptied, and the recycling bin is also emptied.

I already have all the scripts to do this written but would like to combine the 4 files into a .exe so that I only have one file to call in the script.

Any Idea's?

CleanUp :thumbup

This utility consists of two parts: a (32 bits) console application and a graphical

user interface.

Purpose:

Deletes temporary internet files, cookies, files in temp and tmp, log files,

dump files, clears IE history, recent documents list, recycle bin, eventlogs,

explorer search history, dll cache and prefetch directory.

After install of CLEANUP.MSI, save %SystemRoot%\System32\cleanup.exe in a safe place. It's the (32 bits) console application you will use.

type cleanup /? to view switches available for UA install.

Ahh, very nice.. :thumbup

In combo with startX this will make my life much easier

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
  • Recently Browsing   0 members

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