Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide command window when loading

Status
Not open for further replies.

Briandr

MIS
Jul 11, 2003
177
0
0
US
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.

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

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?

Thanks.
 
Hi,

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

set oEnv = oShell.Environment(“PROCESS”)
oEnv(“SEE_MASK_NOZONECHECKS”) = 1
oEnv.Remove(“SEE_MASK_NOZONECHECKS”)

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?
 
All I can think of is that it's a UAC setting. Are you running with elevated rights?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top