Help - Search - Members - Calendar
Full Version: VB6 Question
Flexbeta > Coding > Proggy Corner
cumdunt
vb6 question for y'all.

How do I make the below command run once clicking on the ok button in a msgbox ?
I have the box set up but need it to run ...........

%systemroot%\system32\shutdown.exe -r -f -m \\TEST_PC -t 60

thx in adv

~dunt
KelpFries
Dim ProcessID as Integer
ProcessID = Shell("""%systemroot%\system32\shutdown.exe"" -r -f -m \\TEST_PC -t 60", , True, 100000)

Application name always goes in double quotes, with the arguments after the double quotes at the end of the application call. True is to tell Windows to wait, 100000 is the amount of time that Windows should wait before a timeout occurs.

The Shell command must always be assigned to an Integer variable.

Hope this helps wink.gif
Konrad
hey, just posting so i can use pm
Konrad
...
Konrad
blink.gif 6 more to go.
Konrad
... 5
Ali_ms52
QUOTE(Konrad @ Oct 19 2003, 03:39 AM)
hey, just posting so i can use pm

umm first warning, you are spaming next time you will be ban.
Runmymouth
posting for pm???? what, thats stupid make a valuable contribution and say something or ask an inteligent question.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.