/home

Icon

Informations, tips and technics.

Recover grub bootloader with Vista, Xp and Linux (new)

If you have already see my blog, you have already noticed that I have written an how-to several months ago about recovering grub bootloader with Vista and XP. Well, I have recently have to play a little more with this and I want to share with you about the way I have finally manager to get it working (back). Of course, fell free to comment this post if you have any question or suggestions.

I have to tell you about my recent issue with grub and the way I have manager to get it back as long as my different entries for my different OS. The issue happened to me several days ago and took me 1 week to solve.
For for information I have 2 sata controllers on my pc and 3 disks

  • Controller 1 : a Promise SATA TX2PLUS controller
    • Disk 1 : 3 OS (XP, Vista and OpenSuse)
      • Default boot loader is grub from where I have one entry for each OS
      • Partition 1 : XP
      • Partition 2 : Vista
      • Partition 3 : Extended
        • 1 partition for the swap
        • 1 partition for /
    • Disk 2 : some data
  • Controller 2 : Internal Silicom Image SATA Controller
    • Disk 3 : some data

All was working like a charm for several months now since I had to burn some data on a cdrw. I don’t remember the brand of de CDRW.
One inserted, I have the surprise to see that my brand new cdrw was not clean nor empty but have some data in it!! I had then open it in Explorer (I was working with XP at this time) and found an application called InCD Easywrite.

I do not really now what was that. The text displayed tell me that I have to install the InCD application so my DVD/CDRW burner can manager the CD MRW format… See here  for more information about this format.

I hadn’t take the time to google what was that application nor what the CD MRW format was.

Supidly, I  clicked on the setup file and install the program. At the end of the setup, it prompted me to reboot which I have agreed and…

Got this:

bootmgr is missing

I have immediatly try to find some fix about this issue with this application on the Internet with no luck. At that time, maybe because it was late in the evening, I started to play with different solutions found on the internet and some tool that I have in my admin kit (like SuperGrubDisk or other tool to recover the MBR of my disk). I have to confess that I have not took the most professional way to solve this issue.

For what I remember, I have tried the following:

  • Boot the OpenSuse DVD and use the repair tool
    • The operation was successfull but after the reboot, Grub has no color at all and all the entries seems not functionnal at all
  • Try some advanced options with SuperGrubDisk with no luck
  • Try to reset the MBR with a clean one and try again the OpenSuse repair tool, no luck
  • At one point, even if Linux could be booted from Grub, Vista and XP entries gave me those errors.
  • I remember that I have played with the testdisk utility and cleaned my MBR several times.
  • I remember also that I have tested different combination of howto with supergrubdisk and its brug repair tool.
  • I have also played several times with OpenSuse repair option to try to reinstall my grub bootloaded.
  • At one point, I have tried to reinstall Grub but after a reboot, it did not appear anyway

The best that I can have is a bad grub that can’t boot anything.

I have finally take several minute to think about the situation and try to find a logical way to solve my issue.

What I know for sure is that I hadn’t lost any data: I have booted with some linux and xp live cd (yes there are some! see below) and all my partitions are there with their data. So I know that only the MBR and the boot part of the parition are lost.
Ok. I remembered that several years ago I have used the repair tool of XP and Vista to restore there bootloader (the repair console in XP and the startup repair tool when you boot the Vista DVD).

I decided to give a chance to the Vista repair tool to, at least, have one OS that I can boot.

I have tested the automatic repair and also some manual commands like those : http://support.microsoft.com/kb/927392

But I still have some major issues like those boot messages:

BOOTMGR is missing. Press Ctrl+Alt+Del to restart.

I have try several repair attemps with vista and have those different errors:

  • Status: 0xc000000e; \Windows\System\winload.exe “could not be loaded because the application is missing or corrupt:.” – status: 0xc000000e.
  • Some errors when I choose the XP options in Vista boot menu :
    File: \Boot\BCD
    Status: 0xc000000e
    Info: An error occurred while attempting to read the boot configuration data
  • For what I remember, I had also the Status: 0xc000000f error

Ok… At this point I am thinking about using XP repair console to repair my MBR and have at least one OS that can boot.

Unfortunatly, when I booted the XP cd to have the recovery console the install does not show the option at all and ask me instead if I want to install a fresh copy.
But…
One thing that I have noted is that the display order or the C:, D:, E: drives is bad, like the C: drive is listed not as the first drive in the list but in the second choice.
Also, When I have tested my OpenSuse repair grub option, I have see that in the advanced options, the system offer me to install the grub not on the primary disk (sda) but on the other disk (sdb) which make me think that the different OS that I have try to repair all thinks that my default disk (so the disk where the mbr should be repaired) is not the primary but another of my 3 disks! So the disk/partition sequence/order is not good at all.
Instead of playing with the different combination of disk and controller, I have decided to plug only the correct hard drive, meaning, the one with my 3 OS and unplug the others. But just before this, I have make sure that my disk is really bootable, so:

  • Step 0 : Boot with systemrescuecd and check with gparted tool that my disk have the flag boot set.
  • Step 1 : Unplug any other disks that you may have and have only the disk with your different OS

Now, I have only my controller 1 and my disk 1 with all my OS on it.

Fine. now let’s recover XP boot.

 

I have booted with my XP cd, give the drivers and … no recovery console option! Well, I don’t know why the option was not there but I know that I have no really an easy way to get it back.

But, I have found UBCD4WIN (Ultimate Boot Cd 4 Windows). Based on BartPe, you can create an XP live cd with different tool very usefull on it. For me, the most important part was to have a recovery console to play with and have access to my XP partition.

To create it, you will need to have access to an original XP CD (but there is not need of the insall key). Just have you XP CD, a blank CD and just follow the wizard (note : see below to have the mass storage drivers loaded with the recovery console).

  • Step 2 : Check if you can you can use the XP CD recovery console recovery option or use UBCD4WIN. then recover the XP boot

Once booted, choose the recovery console option. From there, you will have to choose which windows you want to access (in my case I have 2 windows, one is xp and the other one is vista) and then enter for admin password (forgot it? ubcd4win have a tool to change it)
then you can use fixboot and fixmbr and reboot

  • Step 3 : Use fixmbr and fixboot to recover your XP boot

At this point you should have an xp running. cool.
But what about vista and linux?
Well we know that now the only MBR that need to be fixed or updated is the disk currently plugged.
So i have booted my opensuse dvd and use the repair option. I told it to re read the configurtion from disk and save all the stuff.
After a reboot, my grub is there! and I can boot xp!.

  • Step 4 : Recover your GRUB bootloader with OpenSuse (or tool with your Linux distro)

Ok, but about Vista?

Well, if the MBR is correct then the only thing needed for vista is to repair the boot partition.
Let boot the Vista DVD and use the command prompt in the recovery option.
from there use bootrec /fixboot, reboot and then grub should be able to boot linux, xp and vista

  • Step 5 : Boot your Vista DVD, access the command prompt of Vista repair option and use bootrec /fixboot

Tada! Now I can plug my other hard drives. But …

  • Additional step : Fix Vista issue with swtiched drive letters

I have noticed that when Vista booted, some strange errors appears at login time and also I saw that Vista think that my C: drive is actually E:!
For some reasons, Vista seems to be confused about the fact that I have unplug some drive and now it was completely lost about the different drive letters order (I really have to check how Vista can switch from his boot driver lettre to C when it has finsihed to boot…).
I have followed those steps 
http://leghumped.com/blog/2007/01/09/change-drive-letter-on-a-boot-device/
Then reboot Vista 1 or 2 times and all show be fine for this OS.

  • Additional step : Finalize your Grub options

Here, I have only modified the name of the entry (Windows XP, Vista) and add also the option 0x317 to the Opensuse boot option to be sure that I boot in a ‘graphical’ environement like it was before.

Here is a list a tools that I have used:
– UBCD4WIN (http://www.ubcd4win.com/). See note below for recovery console mass storage drivers in UBCD$WIN 3.20.
– Your Windows XP CD (sp2)
– Your Vista DVD
Systemrescuecd (http://www.sysresccd.org/) for its gparted tool
Opensuse 11.x (or any livecd distro used to install grub)

Other tools that can be usefull:
– SuperGrubDisk (http://www.supergrubdisk.org/)
– Fedora or Ubuntu Live CD (fedora.org, ubuntu.com)

I will post some update as soon as I can found more detail informations about the different tools involve like the bootsect option in the Vista repair option.

 Note about UBCD4WIN and mass storage drivers in recovery console:

From a post in the UBCD4WIN forum:

MassStorage drivers plugin dosn’t support Recovery Console yet. You may create a plugin yourself.

  • First copy file (UBCD4Win)\plugin\DriverPacks.net\MassStorage.inf to MassStorageCMDC.inf
  • Edit file MassStorageCMDC.inf, use header section
    [Version]
    Signature=”$Windows NT$”[PEBuilder]
    Name=”# DriverPacks.net – MassStorage – Recovery Console”
    Enable=1[WinntDirectories]
    a=”CMDC”,2[SourceDisksFolders]
    MassStorage\wnt5=a

    [SourceDisksFolders.2600]
    MassStorage\wxp=a

    [SourceDisksFolders.3790]
    MassStorage\w2k3=a

  • Next replace all “txtsetup.sif” with “cmdc\txtsetup.sif”
    Example line :
    “cmdc\txtsetup.sif”,”SourceDisksFiles”,”VMSCSI.SY_”, “1,,,,,,4_,4,1,,,1,4”


If you update MassStorage.inf in future, then update MassStorageCMDC.inf too.

Ref : here

Update:

You may encounter the following issue. From Grub, you can boot XP and Linux but Vista display the error message below:

File: \Boot\BCD
Status: 0xc0000034 (0xc00000e or 0xc00000f)
Info: The Windows Boot Configuration Data file is missing required information

And, when you try to repair your Vista installation using the Vista DVD repair options use the rool bootrec/scanos :

Total identified Windows installations: 0

Here is the steps that I have followed to fix this issue.

  • First ve sure to have the bootsec utility on your Vista, XP drive or on an USB drive (it supposed to come with the Vista DVD but you can find it with some tools like EasyBCD, anyway be sure to have it somewhere accessible from the Vista Repair Console)
  • Boot with the Vista DVD
  • Open the Repair Console, then the Command Prompt
  • Identify your Vista drive letter and your XP driver letter (if you have it installed)
    For me Vista is on the E: drive and XP on the C: drive
  • On the XP partition be sure that you have no C:\Boot folder. if you have one, make a backup and then remove it
  • On the Vista partition, be sure that you have a backup of the E:\Boot folder and then delete it
  • Using Bootrec, do 
    • bootsect /nt52 c: (so the XP partition will only boot XP)
    • bootsect /nt60 e: (so Vista partition can boot Vista)
    • bootrec /fixboot
    • You may have to reboot and go again in the Vista Repair Console
  • Now, bootrec /scanos should tell you that it has found 1 Vista installation
  • Try bootrec /rebuildbcd
  • Now for some reasons, the BCD file is located on the C:\ so if I reboot now, the Vista bootloader will again says ‘The Windows Boot Configuration Data file is missing required information’. So, move the file C:\Boot\BCD to E:\Boot\ (move C:\Boot\BCD E:\Boot\) and reboot
  • Vista should boot now.
Advertisements

Filed under: Linux, Windows, , , , , , , ,

WSUS, Default Web Site and custom ports in IIS

Those days, I have moved my wsus server into a existing server that have already McAfee ePolicy Orchestrator 4 installed.  I have also take the time to put the 2 applications on SQLServer 2005. I will post the entire process of this move later.

Because EPO use Apache on the port 80, I have tested wsus on a new tcp port in IIS (8530 and 8531 for SSL), I have discovered that wsus seems not very confortable with a least 2 things:

  • If wsus install itself in iis using custom port, it put itself in the ‘WSUS Administration’ web site on port 8530
  • When running the client diag of wsus on some client, every client complain with some errors (VerifyWUServerURL() failed with hr=0×80072efd). I have finally discovered that it is mainly due to the fact the the ‘SelfUpdate’ service in IIS is not in the Default web site.
  • I have also discovered that even if all seems working nice, I still have some errors in the event viewer like ‘The DSS Authentication Web Service is not working’

Here are the steps that I have taken to solve my issues:

  • Move EPO apache to port other that 86
    • See https://knowledge.mcafee.com/article/579/614037_f.SAL_Public.html for more information about this. Just remember that you will have also to reinstall your client on each computer that connect to your EPO server.
    • At this end of the procedure, remember to delete the file following the procedure found here:
      • Recompile the ePO agent: 
        In Windows Explorer, navigate to: …\Program Files\Network Associates\ePO\3.x.x\DB\Software\Current\EPOAGENT3000\Install409
      • Move the FramePkg.exe and Framework.z files out of this folder to the root of the c: drive.
        NOTE: Once the ePO services are restarted in the next step, the FramePkg.exe and Framework.z files will be recompiled back into this folder.
      • Click Start, Run, type: services.msc right-click on the following services and click Start:
        NOTE: This will create a new FramePkg.exe and Framework.z file.
        McAfee ePolicy Orchestrator 3.x.x Server
        McAfee ePolicy Orchestrator 3.x.x Event Parser
    • Generate a new Framework package using EPO console
    • On each client, update the Framework EPO agent using : FramePkg.exe /Install=agent /ForceInstall /silent
      Note:
      On some computers, you will have to uninstall the agent before updating it using “C:\Program Files\Network Associates\Common Framework\FrmInst.exe” /forceuninstall”
  • Ok now the port 80 is free for IIS.
    • Make sure the value for PortNumber under the “HKLM\SOFTWARE\Microsoft\Update Services\Server\Setup” key is set to the correct port (the one your WSUS site is on).
    • Make sure that the IIS web site where WSUS is installed is called ‘Default Web Site’
    • Go to your wsus installation (C:\Program Files\Update Services\Tools) and use:
      wsusutil configure ssl : if you use ssl
      wsusutil usecustomwebsite false : this will either move your wsus to the ‘Default Web Site’ site in IIS on use port 80 or if you use the ‘true’ option, this will move wsus to the ‘WSUS Administration’ IIS web site on port 8530 port.
  • Reconfigure your SSL in IIS
    – On the root ‘Default Web Site’ site in IIS, go in ‘Directory Security’ tab on tell IIS to reuse a certificate that you have already have created.
    – Reconfigure SSL for some folders in IIS, according my previous post.
  • Of course, you will have to configure your GPO or registry to reflect the changes.

And finally no more errors!

Filed under: Windows, , , , , ,

Wierd samba access issue with Windows.

I found this one funny (sort of…).

A user who use a Windows 2003 terminal server session reported be having a problem access a samba share after the server, which is part of a domain, asking him to change his password (controlled by a GPO). He changed his password, access his session and then he tried to access his samba share using

 Start /cmd / \\sambaserver\<username>.

Windows then prompted him a user name and password. But whatever username and password he entered, it was rejected.

The funny thing is that the event viewer did not report any issue and there are no entries in the samba logs at all, no errors or anything. Even when the user logged out and logged in again, the same behaviour occurred.

Wow…

We finally discover that some shortcuts displayed in My Network Placesworked well on the samba server without asking any username and password. We saw also that a network drive was disconnected.

  • We finally resolve the issue by using  start / cmd and using net use
  • This will list all network resources currently used by the user on the system.
  • we have done some cleanup using net use <entry> -DELETE for each item displayed here.

Then the user have been able to go the samba share without any problem.

Hope this help!

Filed under: Windows, , , , , , , ,

My Network Places in Windows hangs when you access or delete an item

On a Windows 2003 server which act as a termial server, a user report me that when he access My Network Places and try to access or delete one of the entry listed there, his session hangs there is no option that to kill is session. Note that it can also occurs in Windows XP.

Well, I have looking for a fix for this issue but can’t find something really interesting until I do a simple task: clean all the entries listed there! But how we can acheive this if the computer hangs? Well, just do this:

Clearing Existing Shortcuts from My Network Places

  1. Click Start, point to Settings, and then click Taskbar & Start Menu.
  2. Click the Advanced tab.
  3. Click Clear to remove records of recently used documents, programs, and Web sites.
  4. Click OK.

That’s all!

Some things you want to know about My Network Places. The items listed here are displayed when you access some files one a network share. So if you want your shorcuts back, simply access/open a file on the share on the network.

Computers are listed here when Windows search over the network for some shares also, they disappear when it can’t access them after 48h.

Ref : Ms KB Article

Filed under: Windows, , ,

Nagios NRPE_NT configuration with MSSQL$…service

I don’t know if you know Nagios but it is a quite nice (yet tricky) monitoring solution for you IT infrastructure. With this open-source solution, you can monitor daemons and services, nics, CPU load, memory use, disk usage, etc. for your Linux and Windows systems. 

I came recently across a problem when adding a SQLServer service to my nrpe.cfg config file using the NRPE_NT client. For the background, some software like McAfee Epolicy Orchestrator, BrigthStore Arcserver installed themselves with a limited version of SQLServer. The point is the SQLServer service (name of the service) is listed in the registry something like this MSSQL$<name of your application> (ex: MSSQL$EPOSERVER).

If you try to just copy/paste that name in your nrpe config file, Nagios will says something like:

MSSQL$EPOSERVER$ : Service unknown

As you can see, it add a $ sign at the end.

To correctly monitor this service in Nagios (when your use NRPE_NT), configure your nrpe.conf file like this:

  • # Epolicy Orchestrator MSSQL Service
    command[check_epomssqlservice]=c:\nagios\nt_plugins\check_nt -H localhost -v SERVICESTATE -l MSSQL”$$”EPOSERVER

Note the “$$” (double quote, dollar sign, dollar sign, double quote) between MSSQL and the name your application/software.

Filed under: Windows, , , , ,

Catalyst 8.1 are out with AGP patch

A good news for all of us that have a AGP card and DirectX issues with the 4 or 5 previous drivers from AMD. The Catalyst 8.1 drivers are out and the fix for AGP card also (the web page that is fix is unsupported which I found funny but well, if they works…).

I will test them as soon as I can and try to find how they manage to fix the AGP issue.

The links:

Note: The fix is for Windows XP and Windows Vista. For 64 bits versions or to access the general driver download section, go here. 

Filed under: Windows, , , , ,

Error occurred while downloading file SiteStat.xml

When you use McAfee Epolicy Orchestrator and have deployed CMA (Common Framework Agent) AKA McAfee agent or Epo Agent, you can receive this error message when you try to update the agent and when it contact the EPO server:

Le log are located in C:\Documents and Settings\All Users\Application Data\McAfee\Common Framework\Db\Agent_<server_name>.log:

...
Error occurred while downloading file SiteStat.xml
Error downloading file \SiteStat.xml, naInet GetLastError() = 0
...

In my case I was able to resolve this issue because Epo Server or the CMA installation is confused about what IP address to use. On my Epo Server, I have two NICs, one is for the backup network and the other one the normal LAN access.

I have created the Framework package called FramePkg.exe and installed it manually on some servers. The server then reported them as non compliants and each CMA failed to retreive the SiteStat.xml file from the Epo server.

I had to modify the following files on each problematic server located at C:\Documents and Settings\All Users\Application Data\McAfee\Common Framework:

  • SiteMapList.xml
  • SiteList.xml
  • ServerSiteList.xml
  • Stop the McAfee Common Framework service
  • Go the the folder indiacted above
  • Locate for each files indicated above the IP address, check and modify if needed the false IP address of the EPO server and replace it with the good one.
  • Restart the service

Of course, you will have to do this at the server level also. On the EPO server, there are some files you could edit and change the ip address:

  • In C:\Program Files\McAfee\ePolicy Orchestrator, open SiteInfo.ini and modify the value for LastKnownIP (LastKnownIP=<ip address>)
  •  In C:\Program Files\McAfee\ePolicy Orchestrator, open server.ini and add at the end of the [SERVER] section the value ServerIPAddress=<ip address>
  • Restart the EPO services and you should be ok.

After that, if you starts an update session, all should be correct this time.

Filed under: Windows, , , ,

Catalyst 7.12 Windows XP and OpenSuse 10.3

As an Sapphire X1950 pro 512 AGP video card owner, I always try to install the latest drivers from ATI to have an up to date system to work and play with. The past 4 months have been quite frustrating for me because since the 7.7 version, Catalyst drivers on Windows, even if they install fine, does not seems to work at all and fail every DirectX tests.

This seems to be a common issue for the NForce2 chipset owner. I have an ASUS A7N8X-E Deluxe.

Here is my setup

  • ASUS A7n8X-E Deluxe, latest BIOS 1013
  • 2 Gb Ram (Dual Channel)
  • Athlon XP 3000+ (core Barton)
  • Sapphire X1950 Pro 512 AGP
  • NVidia Nforce drivers version 5.11
  • AGP Texture Size : 128
  • Other BIOS settings are ‘regular’, no overclocking, no custom timings.

Right now, only the 7.7 drivers have been working fine with my system.

I have decided to compile here some searches I have made to solve this issue and I hope they will work also for me.

  • They are some issues with Catalyst 7.9 and maybe 7.10 so, try those tricks with the latest versions 7.12
  • If you have an NVIDIA NForce 2 chipset and have the latest 5.11 chipset drivers installed, try uninstall them and install the previous one (the 5.10 I guess) instead. Some user recommand to not install IDE and/or GART drivers. Then install the 7.12 and see if DirectX diags work this time
  • Some users have reported that replacing some files may also help:
    – Install the 7.7 working drivers
    – Locate and copy somewhere the file ati3duag.dll (and also the ati3d1ag.dll) somewhere on your disk
    – Remove the 7.7 drivers
    – Install the 7.12 drivers
    – Go in Safe Mode, then overwrite the existing file with the one that you have just get from previous 7.7 drivers installation
    – Restart and see if DXDiag works this time
  • Some users have reported that settings the AGP Texture Size from 128 to 256 seems to have resolved the issue.

Also, you can test alertnate ATI drivers like the one provided by Omega, see here for download.

I have not tested myself those tricks but I will and I will post the result here.

Ref : link, link2, link3

And for Linux now?

Well I have tested the 7.12 on my OpenSuse 10.3 installation and do a very basic installation. I even deleted the existing xorg.conf in case of, ran a sax2 -a to have a blank, working xorg.conf file, runs then sax2 -r -m 0=fglrx and … they do not work right now: sax2 display a black screen after starting a X server and I need to reboot to have access to my system.

Ok, I will test again and spend more time on the 7.12 driver installation on Linux and I soon as I have a working solution, I will post it here.

Stay tuned.

Update (24.12.2007)

Well, the trick to install previous nforce chipset drivers was not working (at last) for me… I will test the AGP Texture Size and the file replacement trick soon and let you know about the result.

Filed under: Linux, Windows, , , , ,

Simple guide to recover your various boot loader

Update : See there for some other way to recover your grub-xp-vista bootloader

I have previously posted some tips about boot loaders and I think that I have to right a new post with some steps that you can try to recover your various boot loaders, from Grub, XP or Vista. This is not a complete guide since I cannot guarantee to 100% that it will work in all scenario but maybe it can help. I will take my own configuration as an example:

  • OpenSuse Linux 10.3
  • XP
  • Vista

All installed on the primary disk.

Also, the install order is :

  • XP
  • Vista
  • OpenSuse 10.3

As you already read in a previous post, after OpenSuse 10.3 was installed, all boot entries should works and be available in Grub at this time.

Recover your Grub bootloader

  • See my previous post
    Just remember that there is a bug in OpenSuse 10.3 repair option so I have to use another tool

Your XP entry does not work after installing Vista

  • After installing Vista, your old XP entry is correctly listed in the Vista boot loader but a message appear when you try to boot XP : Can’t find file ntldr
  • Boot on Vista, copy the file from your XP partition boot.ini. ntldr and ntdetect.com to your root Vista partition, that should resolve the issue (just remember that those files may be hidden)

The Vista boot loader no longer work

  • First, use the Vista DVD to boot your system and try the repair options. At least, you should have a recovered Vista boot loader.
  • Sometimes, even if the repair was successful and that you can boot Vista, you XP entry does not work. In this case, check the XP entry for the driver letter. (I will post soon what I have on my machine to make things clearer)
  • To ease the troubleshooting, once in Vista, download and use (make a backup of your bootloader first!) a tool like EasyBCD (link) so you can change some settings more easily.

Error in partition table, unable to repair Vista, XP or Grub boot loader

  • In this case, I had the best results by writing a new and clean MBR to the disk using a tool like TestDisk. You can find this tool with the SystemRescueCD (link). Just select your disk and select the option to reset MRB to zero and install a clean MBR.
  • Once done, try again the Vista repair option and other tips in this post.

Just a note : Sometimes, after writing a clean MBR to the disk, it may be necessary to use first the recovery option from the XP cd to install the XP boot loader first. Just boot using the XP cd, then access the recovery console. From here, use the fixboot and fixmbr options. Please check also the command to find, list an recover your XP boot entry. Once you have done that, you should be able to boot at least XP. Then you should proceed with the Vista repair tips.

That’s pretty all for now. I will try to update this post with more details soon.

Filed under: Linux, Windows, , , , , , , ,

Vista shutdown icon shortcut on your desktop

I will not try to justify why or why not having a shortcut to shutdown the computer in Vista directly on your taskbar or on your desktop but I think it still a thing that could be interesting to know.

The first part is really simple to create the shortcut in Vista as you always do. The interesting thing is what command you should use:

  • Shutdown Computer
    Shutdown.exe -s -t 00
  • Restart Computer
    Shutdown.exe -r -t 00
  • Lock Workstation
    Rundll32.exe User32.dll,LockWorkStation
  • Hibernate Computer
    rundll32.exe PowrProf.dll,SetSuspendState

There is another parameter for the shutdown command, the f parameter which seems can be interpreted by force, meaning forcethe shutdown. That could prevent any message that could prevent a proper shutdown (like a process that not responding or an opened document in Word or Notepad)

Ex:

Shutdown.exe -f -s -t 00

Ref :

Filed under: Windows, , , ,