Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8454549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:03:28+00:00 2026-06-10T12:03:28+00:00

This is a VBScript that I would like to improve. I would like four

  • 0

This is a VBScript that I would like to improve. I would like four things :

1) Add a line that would rename the extension cleanup.dll to cleanup.exe, so as it can be called by the WshShell.run and executed (hidden).

2) The way it is written just below, the script opens two screens : the screen of the cleanup.exe and a blank screen, which should be hidden for the user and it is not what is happening ! How to hide the second screen ? I want to run it invisibly (the user cannot close or manipulate the second screen. It will be closed via code that is inside the cleanup.exe).**NOTE : The code below works perfectly in Windows XP, but not on Windows 7. How to make it work in all Windows platforms ?

VBSCRIPT “Second.vbs”

Set WshShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject") 
objFSO.MoveFile "cleanup.dll" , "cleanup.exe" 
WshShell.Run "c:\cleanup.exe", 0, TRUE
Set WshShell = Nothing

BATCH “Master.bat”

@echo off
wscript Second.vbs
exit /b

3) Is there a good and reliable software to convert from VBS to EXE ?

4) The other problem I am having is that the command line below does not yield results.Must I use the second pard of the code below instead ? Why ??

Suppose that my Batch file is in located in drive f:\

If I double click on it, my screen should be then populated with information extracted from the TXT file, which actually resides in drive c:\

@echo off
set DRV=C:\August\MyProgram
cd\
cd %DRV%
type test.txt & pause>nul


@echo off
set DRV=C:\August\MyProgram
cd\

c:

cd %DRV%
type test.txt & pause>nul

Thank you in advance for the explanations and solutions

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T12:03:29+00:00Added an answer on June 10, 2026 at 12:03 pm

    Why run with batch, vbscript is more powerfull and offers more controll.

    about the visible console window
    WshShell.Run "c:\cleanup.exe", 0, TRUE should hide the console while running and waits before continuing
    Make sure you start your script with wscript.exe, not cscript.exe and don’t use any wscript.echo

    Renaming a file

    Set objFSO = CreateObject("Scripting.FileSystemObject")
    objFSO.MoveFile "cleanup.dll" , "cleanup.exe"
    

    about the batch cd, practice this in a console window
    cd never changes to a drive, only to another map, drive: changes the active drive

    d: => d:\>
    c: => c:\> (so now if you are on c:\)
    cd d:\test =>c:\ (changes your active map on d: to d:\test but since your c: drive is still the active drive you see nothing happening)
    d: => d:\test (change drive to d:, you do see that the active map on drive d: is d:\test (at least with the default prompt)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a one dimensional array in VBScript that I would like to run
this is my first question in here, and I would like to ask if
I know that the web is full of questions like this one, but I
I would like to create a shortcut on the desktop using VBScript code. I
im trying to make a vbscript that would list all contents in dir and
I would like to write a VBScript to change the default printer, based on
I have a plain text file that looks like this - 234234 some text
I have a VBScript script that takes 2 command-line arguments and does some validation.
Seems like this would be a common question, though I could not find it
I previously had a small VBScript that would test if a specific website was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.