Problems with vbs files.

June 23, 2010 at 16:35:44
Specs: Windows 7, 4 gbs
I am making this vbs file here is the script -----


dim wsh
set wsh=createobject("wscript.shell")
intResponse = MsgBox("Your Pc has found a virus," & Chr(13) & "would you like to remove it?",4+48,"Windows 7")

If intResponse = 6 Then fname="yes.bat"
If intResponse = 7 Then fname="no.bat"
wsh.run fname&",1,true"
wscript.quit


It says -------------------
wsh.run fname&",1,true"

Is wrong. Someone help me.,


See More: Problems with vbs files.

Report •

#1
June 23, 2010 at 18:29:39
hello again, sorry i didn't finish helping with this thread.
I didn't hear back for awhile so i thought you had it solved.
this worked on my system:

wsh.run fname,0

0 means run invisible, but sometimes that causes problems.
If in doubt, run as either 1 (window) or 2 (minimized).
wsh.run fname,1
wsh.run fname,2


Report •

#2
August 9, 2010 at 12:06:11
Thanks I fixed it!

Report •
Related Solutions


Ask Question