Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Hide command window when loading

Hide command window when loading

Hide command window when loading

Hi Guys,

This line is an extract from a simple script I have:

wshshell.run """C:\Scripts\Page File\Page File.vbs""", 0, True

I would think this would run and suppress the command window so the user does not see it. Do I have the line coded incorrectly? Do I want to use wshshell.exec? I can paste the rest of the code, but it is nothing fancy. I would just the command window hidden.

Thank you.

RE: Hide command window when loading

wshshell.run "cscript.exe ""C:\Scripts\Page File\Page File.vbs""", 0, True

RE: Hide command window when loading


Thanks for the suggestion. One follow up. I am trying to run my script post sysprep in Windows 7 via setupcomplete.cmd. How can I code the line so Windows 7 doesn't ask me if I want to open the VBS?


RE: Hide command window when loading


I tried the following and I am still presented with a window prompting me to open the file:

set oEnv = oShell.Environment(“PROCESS”)

This does not work when integrated with the rest of my vbscript. Any suggestions to get the vbscript to work without prompting prior to opening the file?

RE: Hide command window when loading

All I can think of is that it's a UAC setting. Are you running with elevated rights?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close