LiveXP is a very flexible PE 1x, using Explorer as shell, supporting SATA/IDE drives, USB devices, and many other features and tweaks. This project is based on PE environment and will use a Windows ™ XP/2003 Install CD.

Download server link to use with the WinBuilder Download Centre: www.livexp.galapo.net.

Download the most recent archive of the project:

 
Reply to this topic
 Execute a command before shutdown
post Nov 22 2009, 02:17 PM
Post #1
Arjun
Newbie   *
Group: Members

  Joined: 30-July 09 From: India

Posts: 29
Thank(s): 5


India


Hi,
I am using Imdisk to mount a disk image in LiveXP. And I often forget to un-mount the image before shutdown. I hope it won't cause any trouble. But for some other reasons I want to execute a command when I press the shutdown button.
On googling, I found that my task was very easy using the group policy editor. Unfortunately, LiveXP doesn't have gpedit.msc. Is there any other way to run a batch file when I give the shutdown command or include group policy to LiveXP.


+Quote Post
post Nov 22 2009, 04:27 PM
Post #2
was_jaclaz
Finder   ******
Group: Advanced user

  Joined: 14-July 06 From: Gone in the mist

Posts: 7,230
Thank(s): 564


Italy


What you might be missing is that gpedit.msc is nothing but a tool, an editor.

On a "normal" XP, what it actually does is, provided you added your script (myscript.cmd) in:
%SystemRoot%\System32\GroupPolicy\Machine\Scripts\Shutdown

to write a Registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Shutdown\0\0
With contents:
CODE
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Shutdown\0\0]
"Script"="myscript.cmd"
"Parameters"=""
"ExecTime"=hex(b):00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00


Point is that LiveXP is NOT XP, it is a PE.

I don't think that the GroupPolicy is effective in it. unsure.gif

I guess that on a PE the methods discussed here:
http://www.911cd.net/forums//index.php?showtopic=15987
are the only viable ones, cannot say how they would apply to LiveXP....

jaclaz


--------------------
+Quote Post
post Nov 22 2009, 04:45 PM
Post #3
was_JFX
Frequent Member   ***
Group: Advanced user

  Joined: 13-December 07
Posts: 486
Thank(s): 249


Germany


Well not a good solution, but may usefull unsure.gif

Put a batch file on desktop and use this one to shutdown.

CODE
start /w imdisk /u blabla
rundll32 msgina,ShellShutdownDialog

rem If themeing script is used, use this one
rem rundll32 pegina,ShellShutdownDialog


--------------------
+Quote Post
post Nov 23 2009, 08:24 AM
Post #4
Arjun
Newbie   *
Group: Members

  Joined: 30-July 09 From: India

Posts: 29
Thank(s): 5


India


@jaclaz
Thanks for Ur reply.
I went through the 911cd.net forum. Its based on XPE and they used Nu2menu.xml to configure the shutdown process. It cannot be used for my situation.

@JFX
Your batch command works fine. But I still need to run the batch file every-time when I shutdown.

huh.gif I still have hope that there is a way execute a command before shutdown. sad.gif
+Quote Post
post Nov 23 2009, 09:40 AM
Post #5
was_jaclaz
Finder   ******
Group: Advanced user

  Joined: 14-July 06 From: Gone in the mist

Posts: 7,230
Thank(s): 564


Italy


QUOTE (Arjun @ Nov 23 2009, 10:24 AM) *
huh.gif I still have hope that there is a way execute a command before shutdown. sad.gif


The modified gina is probably the way to try.

Beware scared9.gif it is a slippery path to take.

Some places to start:
http://wwwthep.physik.uni-mainz.de/~frink/...e09/readme.html
http://www.pgina.org/

On the other hand, which shell are you using?
What is the actual action you perform for shutting down?

jaclaz



--------------------
+Quote Post
post Nov 23 2009, 02:19 PM
Post #6
Arjun
Newbie   *
Group: Members

  Joined: 30-July 09 From: India

Posts: 29
Thank(s): 5


India


crazy.gif
QUOTE

The newGINA method was quit interesting. It do have a option to run script at shutdown. But it didn't work in my XP. Anyway, I am using explorer as shell and it uses PEloader. Also am using XP themes script. GINA used in LiveXP is PEgina.dll
Is there any function included in pegina itself so that we can run script before it shutdowns the system.
+Quote Post

Reply to this topic
1 User(s) are reading this topic ()



Collapse

  Topic Replies Topic Starter Views Last Action
No New Posts command-line xp or pe to ram
1 betrand 234 19th August 2010 - 05:55 PM
Last post by: Wonko the Sane
No new Topic has attachmentsShutdownPE
Replacement for shutdown/restart in LiveXP/Vista/Win7
62 homes32 6,539 30th May 2010 - 07:38 PM
Last post by: homes32
No New Posts Shutdown utilities for Win7PE
1 Replicant 674 21st February 2010 - 12:38 AM
Last post by: paraglider
No New Posts Shutdown and Restart Not Working
3 iceycone 735 17th February 2010 - 02:44 PM
Last post by: homes32
No New Posts Topic has attachmentsshutdown when explorer isn't shell
10 Galapo 879 11th February 2010 - 01:11 AM
Last post by: homes32