Shutdown and Restart 
Author Message
 Shutdown and Restart

I would guess you are using win 95

rundll.exe user.exe, exitwindowsexec EW_REBOOTSYSTEM , 0

--
marfers notes for Outlook Express 5
http://www.*-*-*.com/
Mark L. Ferguson   Please reply in Newsgroup.

Quote:

> I need to have a pc shutdown and restart.

> I had previously found rundll32 shell32.dll SHExitWindowsEX 2

> but when I run I get error in shell332.sll missing entry

> any tips?

> Thanks!



Sun, 25 Aug 2002 03:00:00 GMT  
 Shutdown and Restart
I need to have a pc shutdown and restart.

I had previously found rundll32 shell32.dll SHExitWindowsEX 2

but when I run I get error in shell332.sll missing entry

any tips?

Thanks!



Mon, 26 Aug 2002 03:00:00 GMT  
 Shutdown and Restart
is there a way to simply logoff only?
there is no exitwindowsex for user.exe!
Quote:

> I would guess you are using win 95

> rundll.exe user.exe, exitwindowsexec EW_REBOOTSYSTEM , 0



Fri, 30 Aug 2002 03:00:00 GMT  
 Shutdown and Restart
I couldn't get any of those fancy rundll, execwindow, blah, blah stuff to
run either. Here's a simple way, if this will meet your needs:


2. Save to the folder where you and/or your users have the appropriate
access to.

3. Right-click the file and set the following properties:
    On the Program Tab at the bottom select "Close on exit".
    On the Program Tab click the advanced button.
        Select "MS-DOS Mode"
        Select "Use current MS-DOS configuration"

Close out the dialog. The system will create a .pif file in the same
directory as the .bat file. Call the .pif file, which the system doesn't
show the extension for, with the following line in your script:
objShell.Run "file://\\<yourserver>\<yourshare>\yourfolder\yourpif.pif, 0
(sans the "file://" which OE so generously adds for us)


returns you to windows, with the following exception; The system won't
actually execute the .bat file until your code finishes any code in the
module were the call to the .pif is being made from, so you can do any
clean-up or log file maintenance prior to the actual shutdown | reboot. I
haven't done more than a simple Wscript.Quit, I assume you could keep
running code for as long as you want. Even after waiting several minutes the
shutdown | reboot doesn't happen until that last line of code executes.

Simple, elegant, failproof (so far!),

Marcus


Quote:
> is there a way to simply logoff only?
> there is no exitwindowsex for user.exe!


> > I would guess you are using win 95

> > rundll.exe user.exe, exitwindowsexec EW_REBOOTSYSTEM , 0



Fri, 30 Aug 2002 03:00:00 GMT  
 Shutdown and Restart
The following scriptlet will do the job (I believe Gunter Born provides this
info on his Web site)

Set wshShell = WScript.CreateObject("WScript.Shell")

'Logoff Windows
wshShell.Run "RunDll32.exe Shell32.dll,SHExitWindowsEx 0x0"



Quote:
> I couldn't get any of those fancy rundll, execwindow, blah, blah stuff to
> run either. Here's a simple way, if this will meet your needs:

> 1. Create a batch file with the following single entry:

> 2. Save to the folder where you and/or your users have the appropriate
> access to.

> 3. Right-click the file and set the following properties:
>     On the Program Tab at the bottom select "Close on exit".
>     On the Program Tab click the advanced button.
>         Select "MS-DOS Mode"
>         Select "Use current MS-DOS configuration"

> Close out the dialog. The system will create a .pif file in the same
> directory as the .bat file. Call the .pif file, which the system doesn't
> show the extension for, with the following line in your script:
> objShell.Run "file://\\<yourserver>\<yourshare>\yourfolder\yourpif.pif, 0
> (sans the "file://" which OE so generously adds for us)


which
> returns you to windows, with the following exception; The system won't
> actually execute the .bat file until your code finishes any code in the
> module were the call to the .pif is being made from, so you can do any
> clean-up or log file maintenance prior to the actual shutdown | reboot. I
> haven't done more than a simple Wscript.Quit, I assume you could keep
> running code for as long as you want. Even after waiting several minutes
the
> shutdown | reboot doesn't happen until that last line of code executes.

> Simple, elegant, failproof (so far!),

> Marcus



> > is there a way to simply logoff only?
> > there is no exitwindowsex for user.exe!


> > > I would guess you are using win 95

> > > rundll.exe user.exe, exitwindowsexec EW_REBOOTSYSTEM , 0



Fri, 30 Aug 2002 03:00:00 GMT  
 Shutdown and Restart
A foxpro/DOS application in my company will be run
inside a Win95 DOS box by some users. Unfortunately,
the Win95 always showed a blue-screen when the application
exit and issue a Netware LOGOUT. So I wanted to call a command-line
program to logout Win95 (ExitWindowsEx, EXW_LOGOFF) properly.

I actually found a shareware called Impel Cycler, but it needs
US$15 per station. Definitely a rip-off for such a simple task.
Your solution involved a re-start which is not acceptable in
my case.

Quote:
> I couldn't get any of those fancy rundll, execwindow,
> blah, blah stuff to run either. Here's a simple way,
> if this will meet your needs:



Sat, 31 Aug 2002 03:00:00 GMT  
 Shutdown and Restart
It's still giving me Error in user,exe Missing Entry.  It also gives me a
dialog box.  most I'd really want is OK.

Any other ideas?

Thanks!



I would guess you are using win 95

rundll.exe user.exe, exitwindowsexec EW_REBOOTSYSTEM , 0

--
marfers notes for Outlook Express 5
http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm
Mark L. Ferguson   Please reply in Newsgroup.

Quote:
> I need to have a pc shutdown and restart.

> I had previously found rundll32 shell32.dll SHExitWindowsEX 2

> but when I run I get error in shell332.sll missing entry

> any tips?

> Thanks!



Sat, 31 Aug 2002 03:00:00 GMT  
 Shutdown and Restart
Doesn't have the Windows shutdown stuff, but just about anything else you can think of...

Shelling Control Panel Applets and System Wizards
http://www.mvps.org/vb/tips/shellcpl.htm

Courtesy of Karl E. Peterson, MVP

If you want the low down on rundll32.exe...

VBnet System Services: The Windows 95 Rundll and Rundll32 Interface
http://www.mvps.org/vbnet/code/system/rundll32.htm

Courstesy of Randy Birch, MVP

--
Michael Harris
MVP Scripting


Another question... Where do you find these function calls / procedures?
Can you recommend a book?

Thanks


I would guess you are using win 95

rundll.exe user.exe, exitwindowsexec EW_REBOOTSYSTEM , 0

--
marfers notes for Outlook Express 5
http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm
Mark L. Ferguson   Please reply in Newsgroup.

Quote:
> I need to have a pc shutdown and restart.

> I had previously found rundll32 shell32.dll SHExitWindowsEX 2

> but when I run I get error in shell332.sll missing entry

> any tips?

> Thanks!



Sat, 31 Aug 2002 03:00:00 GMT  
 Shutdown and Restart


Quote:
> It's still giving me Error in user,exe Missing Entry.  It also gives
me a
> dialog box.  most I'd really want is OK.

> Any other ideas?

If you are wanting to do it from a shortcut, put this in the target
exactly as you see here:

C:\WINDOWS\RUNDLL.EXE user.exe,exitwindowsexec

HTH,
--
Regards,

Matt B.



Sun, 01 Sep 2002 03:00:00 GMT  
 Shutdown and Restart
Another question... Where do you find these function calls / procedures?
Can you recommend a book?

Thanks


I would guess you are using win 95

rundll.exe user.exe, exitwindowsexec EW_REBOOTSYSTEM , 0

--
marfers notes for Outlook Express 5
http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm
Mark L. Ferguson   Please reply in Newsgroup.

Quote:
> I need to have a pc shutdown and restart.

> I had previously found rundll32 shell32.dll SHExitWindowsEX 2

> but when I run I get error in shell332.sll missing entry

> any tips?

> Thanks!



Sun, 01 Sep 2002 03:00:00 GMT  
 Shutdown and Restart
Thanks, I'll give it a try.

Marcus



Quote:
> The following scriptlet will do the job (I believe Gunter Born provides
this
> info on his Web site)

> Set wshShell = WScript.CreateObject("WScript.Shell")

> 'Logoff Windows
> wshShell.Run "RunDll32.exe Shell32.dll,SHExitWindowsEx 0x0"



> > I couldn't get any of those fancy rundll, execwindow, blah, blah stuff
to
> > run either. Here's a simple way, if this will meet your needs:

> > 1. Create a batch file with the following single entry:

> > 2. Save to the folder where you and/or your users have the appropriate
> > access to.

> > 3. Right-click the file and set the following properties:
> >     On the Program Tab at the bottom select "Close on exit".
> >     On the Program Tab click the advanced button.
> >         Select "MS-DOS Mode"
> >         Select "Use current MS-DOS configuration"

> > Close out the dialog. The system will create a .pif file in the same
> > directory as the .bat file. Call the .pif file, which the system doesn't
> > show the extension for, with the following line in your script:
> > objShell.Run "file://\\<yourserver>\<yourshare>\yourfolder\yourpif.pif,
0
> > (sans the "file://" which OE so generously adds for us)


> which
> > returns you to windows, with the following exception; The system won't
> > actually execute the .bat file until your code finishes any code in the
> > module were the call to the .pif is being made from, so you can do any
> > clean-up or log file maintenance prior to the actual shutdown | reboot.
I
> > haven't done more than a simple Wscript.Quit, I assume you could keep
> > running code for as long as you want. Even after waiting several minutes
> the
> > shutdown | reboot doesn't happen until that last line of code executes.

> > Simple, elegant, failproof (so far!),

> > Marcus



> > > is there a way to simply logoff only?
> > > there is no exitwindowsex for user.exe!


> > > > I would guess you are using win 95

> > > > rundll.exe user.exe, exitwindowsexec EW_REBOOTSYSTEM , 0



Sun, 01 Sep 2002 03:00:00 GMT  
 Shutdown and Restart


Fri, 19 Jun 1992 00:00:00 GMT  
 Shutdown and Restart
Yeah! It worked! Thanks

On the other hand, the following link also have a program
that works. look for poweroff.zip ...

http://users.pandora.be/jbosman/applications.html

Quote:
> The following scriptlet will do the job
> (I believe Gunter Born provides this info on his Web site)
> Set wshShell = WScript.CreateObject("WScript.Shell")
> 'Logoff Windows
> wshShell.Run "RunDll32.exe Shell32.dll,SHExitWindowsEx 0x0"



Mon, 02 Sep 2002 03:00:00 GMT  
 
 [ 13 post ] 

 Relevant Pages 

1. Shutdown and restart windows

2. Shutdown and Restart

3. Shutdown and Restart Windows 95 and NT for VB Script

4. Can I vbscript a system shutdown/restart?

5. Restart/Shutdown Script

6. Windows 2000 Pro - Shutdown/Restart PC

7. Restart computer by vbs ?

8. restart IIS and MTS from a script.

9. Application.Restart possible?

10. Stopping/restarting sevices

11. Restarting IIS from within a .vbs

12. Code: Force Restart Remote computers

 

 
Powered by phpBB® Forum Software