Jump to content

Close dosbox


Ypsos

Recommended Posts

Hallo all

I working on win98 unattended got everything to work but ....

I have to close the dosbox by hand click on the cross to close window

and the install. goes on

CLS

@echo off

ECHO Cleanup Temp Install files...

ECHO.

del "c:\Install.exe"

c:\windows\command\deltree /y c:\Install

ECHO Computer Opnieuw Starten

rundll32.exe shell32.dll,SHExitWindowsEx 2

ECHO.

EXIT

I have to know the syntax to close window auto

Link to comment
Share on other sites


THX for reply

but nothing (yet)

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx][HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz110]

"1"="C:\\Install\\IE6_SP1\\ie6setup.exe /Q:A /R:N"

"@="Internet Explorer 6SP1 NL"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz120]

"1"="C:\\Install\\MSI\\instmsi.exe /Q:A /R:N"

"@="Windows Installer v2.0.2600.1"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz130]

"1"="C:\\Install\\DirectX\\dxsetup.exe /opk"

"@="DirectX 9b"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz140]

"1"="C:\\Install\\Dotnet\\netfx.msi /QB"

@="Dot NET Framework v1.1"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz150]

"1"="C:\\Install\\DotLang\\langpack.msi /QB"

@="Dot NET Framework Nederlands"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz160]

"1"="C:\\Install\\JavaVM\\msjavwu.exe /Q:A /R:N"

@="JavaVM Build 3810"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz170]

"1"="C:\\Install\\Hotfix\\HOTFIX.bat"

@="Hotfixes"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz180]

"1"="C:\\Install\\Scnsaver\\Scnsaver.bat"

@="ScreenSavers"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz190]

"1"="regedit.exe /s C:\\Install\\regtweak.reg"

@="Registry Tweaks"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz270]

"1"="C:\\Install\\Cleanup.bat"

@="Verwijderen van tijdelijke installatie bestanden"

maybe I ve to put syntax after cleanup.bat e.a "1"="C:\\Install\\Cleanup.bat /C" or somthing

Link to comment
Share on other sites

Find the solution Close on exit enabled

shortcut.gif

Source Picture

One way is to right-click the batch file and set it's

properties. window and to close when finished.

The act of setting properties will create a separate "pif" file.

From then on, any time you run the batch file, the settings will

be honored.

So that means you have to save the "pif" file aswell with the "bat"file

Another way is to start the batch file with the START

command using the /MIN option. This has other

interesting consequences... The batch file will run as

a separate process. You may also need to use the /WAIT

option if you need to synchronize the batch file with

something that has to happen after the batch file. Type

"start /?" at a DOS prompt for more info. The NT/XP/2000

START command has lots of cool options, while the 95/98

command has little more than I've described. Keep in

mind that the START command will have it's own DOS

window! So running your batch file with "/min" but

without "/wait" will cause the START command to very

briefly pop up a DOS window, then be replaced by your

batch file running minimized.

The coolest way is to make the batch file run totally

invisibly. This is just a little dangerous because your

batch file MUST be able to close itself and MUST never

produce an error which might require user input.

Otherwise the batch file will hang invisibly until

system shutdown or until someone kills it with the task

manager. To do this trick REQUIRES that you have Windows

Scripting installed. Scripting is standard on Win98 and

newer, and is an optional free download for Win95. To

test, type "wscript" in the Start/Run dialog. If you get

a settings dialog, you have it. If you get an error or

Windows offers to find it for you, you don't have it.

See my scripting web page for more info:

http://www.ericphelps.com/scripting/index.htm

Save this one line of text as "invisible.vbs":

CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False

To run any program or batch file invisibly, use it like this:

wscript.exe "C:\Wherever\invisible.vbs" "C:\Some Other Place\MyBatchFile.bat"

------------------------

http://www.ericphelps.com

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
  • 3 weeks later...

If you view properties for the Batch file, and choose Close on exit, it creates a PIF file... Use that with yuo batch file... This might work :D

Edit: sry, didn't read the previous post, sry :D

Link to comment
Share on other sites

  • 2 years later...

A solution I read about in another forum here or elsewhere is this:

-- Batch file begins below --

@echo off

-- body of batch file --

cls

exit 0

-- end of batch file --

The exit can be just exit or exit 0 or I suppose you can even have it return a conditional errorlevel.

The cls clears the screen buffer and exit causes the command interpreter to exit.

What causes the dosbox to close is the cls after all other programs have run.

This works regardless of whether or not you have the pif set to close the window on exit.

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