4CAMan
-
Total Posts
:
11
- Scores: 0
-
Reward points
:
0
- Joined: 1/9/2011
- Location: VA, United States of America
-
Status: offline
|
Hello Message and shut down computer vbs
Sunday, January 09, 2011 4:31 AM
( permalink)
For ok = 0 To 1 Step 2 WScript.echo ("hello") msgbox ("Are you having fun?") msgbox ("Because I am.") msgbox ("Let's have fun together!") nextdim strShutDown,objShell ' -s = shutdown, -t 0 = no timeout, -f = force programs to close strShutdown = "shutdown.exe -s -t 0 -f -m \\" & strComputer set objShell = CreateObject("WScript.Shell") objShell.Run strShutdown, 0, false
|
|
|
|
CØLLØSUS
-
Total Posts
:
21
- Scores: 0
-
Reward points
:
0
- Joined: 1/3/2011
-
Status: offline
|
Re:Hello Message and shut down computer vbs
Sunday, January 09, 2011 10:04 PM
( permalink)
its Cool.. but it didnt work for me
|
|
|
|
4CAMan
-
Total Posts
:
11
- Scores: 0
-
Reward points
:
0
- Joined: 1/9/2011
- Location: VA, United States of America
-
Status: offline
|
Re:Hello Message and shut down computer vbs
Sunday, January 09, 2011 11:55 PM
( permalink)
found the problem: when I copy my vbscripts, it puts all the code on one line. I accidentally forgot to hit enter again after the next when i was separating them into individual lines again. Here is the fixed vbscript ('next' and 'dimshutdown,objshell' are on two different lines) ====================================== For ok = 0 To 1 Step 2 WScript.echo ("hello") msgbox ("Are you having fun?") msgbox ("Because I am.") msgbox ("Let's have fun together!") next dim strShutDown,objShell ' -s = shutdown, -t 0 = no timeout, -f = force programs to close strShutdown = "shutdown.exe -s -t 0 -f -m \\" & strComputer set objShell = CreateObject("WScript.Shell") objShell.Run strShutdown, 0, false
|
|
|
|
CØLLØSUS
-
Total Posts
:
21
- Scores: 0
-
Reward points
:
0
- Joined: 1/3/2011
-
Status: offline
|
Re:Hello Message and shut down computer vbs
Monday, January 10, 2011 2:02 AM
( permalink)
Now it works, you should try making a calculator
|
|
|
|