Jump to content

Creating a .Exe File?


Recommended Posts

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?

Link to comment
Share on other sites


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
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Thats what hidec.exe is for. ;)

No window at all. :)

See:

http://www.msfn.org/board/index.php?showto...84&hl=hidec.exe

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

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