Windows XP Shutdown Directory

Status
Not open for further replies.

bobwill

Posts: 8   +0
My Operating System Info:
OS Name Microsoft Windows XP Home Edition
Version 5.1.2600 Service Pack 3 Build 2600


I am can not get the following to work. I have created a directory named "Shutdown" in the following path: C:\Documents and Settings\Owner\Start Menu\Programs\Shutdown

I placed a "Shortcut" in the "Shutdown" directory that executes a program to lower the Speaker Volume to a low volume. I know that this works, because when I run the shortcut and I have the speaker volume set to high it does get set back to a low setting.

I read that any "Shortcut" placed in the "Shutdown" directory would be executed prior the actual Shutdown of my PC...

Any suggestions??
 
The "gpedit.msc" command is not availble in Windows XP Home Edition.

I did figure it out. I created a batch file that creates a listing of the files in my "Shutdown" directory that I want to execute at Shutdown and then create a shortcut to run the file. Within that batch file is a link to perform a windows shutdown. Seems to work.
 
Well done

By the way, did you want to paste in the lines of the batch file (not the whole lot if it's really long) Just the part that reduces the volume and shuts Windows down (or the whole lot, if it's not 10 miles long :) )
Now I know that everyone's audio drivers are different, so you might want to state what audio you're using
Regarding Xp Home. Doh!
 
Here is what works. I will try to explain the process. I created a directory call "Shutdown" in the same path where the "Startup" directory is maintained. This is not necessary, but just keep it the same path. Here is the path::

C:\Documents and Settings\Owner\Start Menu\Programs\Shutdown

I then created (in my case) two "Shortcuts" and put the in the above path.

One Shortcut executed the program to lower the speaker volume and the other Shortcut Shutdown my PC. The speaker volume and many other devices on your computer can be controlled by a program named "nircmd.exe" and can be found at "nirsoft.net/utils". It is Freeware. The other Shortcut executes the system Shutdown.exe file, i.e. %windir%\system32\shutdown.exe -s -t 0 (Important, the name of the Shortcuts cannot contain any blanks)

I then created a directory called "C:\Shutdown_Batch" and created a "bat" file in that directory name "Lowvolume.bat" It can be called an name. The "Lowvolume.bat" file contains the following lines. You need to have some knowledge of "bat" file commands and what they do.
I will try to explain each line.

LINE 1 just turns off the echo of all commands
LINE 2 writes and redirects the output to a file which I call "volume.bat" in the same directory and just puts the "@echo off" command as the first line.
LINE 3 performs a directory listing on the directory where I have my "Shortcuts".
The "/b" parameter only outputs the name of each "Shortcut" file and redirects and appends the output to the "volume,bat" file
LINE 4 Changes to the directory where the "Shortcuts" maintained. The "/d" switch just makes sure that will happens
LINE 5 executes the information that has been created in the "Volume.bat" file.

@echo off
echo @echo off >"c:\Shutdown_Batch\volume.bat"
dir /b "C:\Documents and Settings\Owner\Start Menu\Programs\Shutdown" >>"c:\Shutdown_Batch\volume.bat"
cd /d "C:\Documents and Settings\Owner\Start Menu\Programs\Shutdown"
call "c:\Shutdown_Batch\volume.bat"

The "volume.bat" file would contain the following commands: Your "lnk" file names would be what ever you named your "Shortcuts". Make sure that the "Shortcut" to shutdown your system end up being the last thing that the "bat" processes. (Important) Make sure this always a 'blank" before the ">" and the end of each redirect line of code.

@echo off
LowVolume.lnk
Shutdown.lnk



I hope this information makes sense and maybe someone else can get some use.
 
Thanks for the update :grinthumb

Although the other bats might have been nice, but I've got it (or will work it out :)
 
Not sure I know what you mean by "Other bats". I did forget to mention I then created a "Shortcut" on my desktop that points to the C:\Shutdown_Batch\Lowvolume.bat file, so when I ready to turn off my PC on just click on the icon and away I go..

There are only two bat files directly involved. In my case the "Lowvolume.bat" file and the "volume.bat" file

If you need anything else let me know.
 
Sorry just the command to reduce volume (or mute, or whatever you're doing)
The bats are easy enough to understand, actually I usually convert the bats to VBS (it was my way of saying I'm not in the past anymore, but VBS requires scripting anyway, so probably bat files are easier)
 
As I stated in my earlier remarks, go to this web site "nirsoft.net/utils" amd download the file nircmd.exe. It is a Freeware program. The webs site explains and gives examples of how to use the the program. To lower the volume on your PC your would create a shortcut with the properties of "%windir%\nircmd.exe setsysvolume 10000: (Ignore quote marks) You can place the "nircmd.exe.exe file in any directory that you like and just address that directory. I place my in the "%windir%" directory because it is easy to get to. Just right click on your "Start" button and "Open\Programs"


PS: I am old and still do "bat" rather than "VBS" I use to write Fortran and Cobalt programs. Ancient!!
 
What ever happened to

10 print hello (or was it "type" ?)
20 goto 10

Now that was exciting, to see it go all the way down the orange screen

Oh thanks for that, of course "nircmd" :)
 
Status
Not open for further replies.
Back