Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 

Sign in to follow this  

Start .vbs from within cmd wont work (again)

Recommended Posts

Hi all,

I'm hoping someone can help me out, this problem has brought me to tears. In the past it worked, it was finished, done and dusted. But then I lost a pen drive and had to start over. It was an unattended install, RunOnce section calls .exe (self extract archive) this puts files in sys32, subsequently sfx runs Register.cmd, also in sys32. The list of commands contained are all proven to work, except for this pesky .vbs script, (it should close a window that Register.cmd previously opened).

The height of irony is that I was helped on this problem in past on this forum. I have re-read that thread and followed the advice and it still doesn't work. The folder will no %$^&@"£ close!! Its one of those things you won't accept no for an answer after wasting this much time.

If SFX is run after logon it desired effect manifests > window opens closes. If .cmd is extracted manually to sys32 and run same story.

Here is the .cmd file:


@echo off
Regedit /s Hubble.reg
Regedit /s Color.reg
Regedit /s Mplayerc.reg
"%windir%\system32\cmd.exe" /c "Start /wait %windir%\system32\ZipClose.vbs //nologo"
Del "%systemroot%\system32\*.reg"

START "" ZipClose.vbs //nologo also works from within SFX but only if done manually after logon.

After logon; If "ZipClose.vbs //nologo" is placed in an empty .cmd, and executed by double click from within sys32, this also works. However it won't work if added to SFX, let alone RunOnce.

The zipclose.vbs looks like this:


Set oShell = CreateObject("WScript.Shell")
If oShell.AppActivate("ZipFile.zip") Then
   WScript.Sleep 500
   oShell.SendKeys "%{F4}"
End If

"ZipFile.zip" is not "ZipFile", a change to reflect the "always show extensions for know file types" option, enabled from nlite.

FWIW, the SFX contains no sub-directory. It extracts into sys32 (%WINDIR%/system32).


I realize this is inconsequential and user can click close window manually... its just that it worked before and makes no sense why.

Edited by shorterxp

Share this post

Link to post
Share on other sites

Looks like I didn't need this stupid script after all. Windows XP Home Edition for some reason did not associate .zip files correctly.

XP Pro works fine.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...