Jump to content

Invisible cleanup.cmd


Recommended Posts

How can I make my cleanup.cmd invisible in wpi window and run it always after all programs are installed? Means last step of installation is always the cleanup, without option to check or uncheck it.

Anybody some suggestion? maybe change one of the .js or make a new point in config,js?

Edited by wixfigura
Link to comment
Share on other sites


How can I make my cleanup.cmd invisible in wpi window and run it always after all programs are installed? Means last step of installation is always the cleanup, without option to check or uncheck it.

Anybody some suggestion? maybe change one of the .js or make a new point in config,js?

i believe the only way youll ever make your cleanup seem invisable is to use the @ key before all lines of your cleanup script to give it the power of the command but the hidden feel you may be looking for

example

@RD /S /Q "%ALLUSERSPROFILE%\Start Menu\Programs\Mozilla Firefox"

@Del "%ALLUSERSPROFILE%\Desktop\Mozilla Firefox.lnk"

hope that helps

Link to comment
Share on other sites

wixfigura,

You can always add cleanup command to wpi.exe (you would have to modify wpi.au3 found in the tools folder of WPI4.4rc1, then recompile). This script will give you the flexibility of running any commands before or after the launch of wpi.hta. The script already contains a placeholder for reboot, cleanup, resolution changer and syntax for adding new commands.

;Cleaning up the desktop.
$cleanup = "del /s/q "& chr(34) & "%userprofile%\desktop\*.lnk" & chr(34)
;Run(@ComSpec & " /c " & "start " & $cleanup,"",@SW_HIDE)

Just uncomment/remove the";" in front of Run and change the $cleanup to indicate the file you wish to run.

Example:

Run(@ScriptDir & "\cleanup.cmd", "", @SW_MAXIMIZE)

Where cleanup.cmd would be in the root of where wpi.exe lives and contains all the functions you wish to run for the cleanup.

Edited by lawrenca
Link to comment
Share on other sites

Hi

you havent understood right. I want to include cleanup-script into wpi, but not being visible in the wpi-window. But always in the following runonceex. Now i have it in the wpi.exe. Its just a cosmetical change.

Link to comment
Share on other sites

I use a program that hides the console window (so it never shows up at all). I don't remember it's original file name, but for me it's something like this:

_hide cleanup.cmd

Pretty simple, actually. And, of course, I have all of my cleanup stuff in cleanup.cmd.

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