topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday April 16, 2024, 6:12 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Adding "Power Options" for Windows OS (Tips & Tricks)  (Read 15674 times)

sgtevmckay

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 838
  • Magis Esse
    • View Profile
    • Rainmeter
    • Read more about this member.
    • Donate to Member
Adding "Power Options" for Windows OS (Tips & Tricks)
« on: February 03, 2010, 12:58 PM »
Greetings folks

For this tip, I am going to expand on the power options that Markham has built-in to Circle Dock as a choice in the "Special" Menu.

NOTE:
Subsequent tutorials may be based on concepts discussed here, utilizing 3rd party applications.
So this will be, at the very least, a great tutorial to review



I feel like an idiot, as Markham kindly provided for us, what many of us already know, and for those that don't; you soon will.

Circle Dock has some great essentials, in the "Special" Selection:
http://img215.imageshack.us/img215/6894/screenshot126201015205p.jpg
Adding "Power Options" for Windows OS (Tips & Tricks)


But what if we want the other options, and are there other things we can do?
Simply: Yes.

We just need to know the codes, or in this case the "Command Lines".

The first give away to me was opening the Off Button's item settings and seeing the arguments:
http://img638.imageshack.us/img638/8923/screenshot126201021220p.jpg
Adding "Power Options" for Windows OS (Tips & Tricks)


I almost fell off my seat. I had forgotten about Command Line a Long time ago.
As we move forward in windows we become more GUI'ed and forget what we would have known utilizing windows XP or earlier.
Command Line arguments were essential in the days of Windows 3.x, Windows 95,  and to a lesser extent Windows 98.

Those Commands are still there, some changes from different distributions of Windows, but there nonetheless.

Markham has reminded me of the power of the command line and the infinite capabilities that are trapped there.
I actually had to blow the dust off an old Windows 95 manual to re-read and remember how to find these Command Line for the arguments.
I will not do this to you...I will just tell you how.

Each version of Windows is a little different on some power options, so you will need to find your options based on what version of windows you are using.

So how do you do find the options available for your OS?
1.) Bring up a command prompt (cmd or cmd.exe)
2.) Simply type in "shutdown"
3.) Hit "Enter" or "Return"
Immediately below you will be given a list of all available options for you OS.
Read these carefully and be familiar with what you can do.
The following screen shot is of my Windows 7 OS and what options are available to me.
http://img63.imageshack.us/img63/1696/screenshot23201094107am.jpg
Adding "Power Options" for Windows OS (Tips & Tricks)


Look at all the options available to us, there is so much that we can do, now that we know what the Commands are.

Now how do we assemble the Command Line in our arguments so that we can have more power options?
How do we assemble these in Circle Dock?

From the above options.
I will work with the following Option:
/g       Shutdown and restart the computer. After the system is reboot-ed, restart any registered applications.
http://img692.imageshack.us/img692/1696/screenshot23201094107am.jpg
Adding "Power Options" for Windows OS (Tips & Tricks)


To added this to Circle Dock, we must create the "Shortcut", so go to your Circle Dock:
1.) Right click on a ring or icon
2.) go to Add > File,Folder or Special Item
http://img36.imageshack.us/img36/4859/screenshot232010101040a.jpg
Adding "Power Options" for Windows OS (Tips & Tricks)


3.) Click on "File,Folder or Special Item"
This will give us a blank Item Setting to work with.
http://img692.imageshack.us/img692/8486/screenshot232010101630a.jpg
Adding "Power Options" for Windows OS (Tips & Tricks)


Now for top down instruction:

Name:
I will label mine "Restart with Programs"
http://img692.imageshack.us/img692/4706/screenshot232010102005a.jpg
Adding "Power Options" for Windows OS (Tips & Tricks)


Description (Optional)
I tend to leave this alone, but you are welcome to make any entry you feel proper to aid in keeping your Circle Dock organized to your personal liking
http://img137.imageshack.us/img137/9325/screenshot232010102310a.jpg
Adding "Power Options" for Windows OS (Tips & Tricks)


Target
In the target area:
Type "shutdown.exe" (without quotes)
This is case-sensitive, so be sure that you type shutdown in lower case.
http://img17.imageshack.us/img17/5243/screenshot232010102729a.jpg
Adding "Power Options" for Windows OS (Tips & Tricks)


Arguments
This is where you will use the code(s) given from the Command Prompt window.
again I will be using the following option:
/g       Shutdown and restart the computer. After the system is rebooted, restart any registered applications.

So; in the "Argumenet" I want to enter"
/g
Again: this is case sensitive. So make sure that you are using lower case lettering.
http://img697.imageshack.us/img697/2301/screenshot232010104002a.jpg
Adding "Power Options" for Windows OS (Tips & Tricks)


Now we could just hit Finished, but I am going to suggest against this.
Here is why:

We are creating a Command Line. By doing this we will experience a CMD Window when we hit this button.
This window flash is annoying, unprofessional, and unpolished.
http://img508.imageshack.us/img508/6788/screenshot232010105054a.jpg
Adding "Power Options" for Windows OS (Tips & Tricks)


Thanks to the Circle Dock programmers foresight, we have a simple solution.
Minimize!!!

Run (in window type)
In the drop down window select Minimized
http://img30.imageshack.us/img30/1469/screenshot232010104751a.jpg
Adding "Power Options" for Windows OS (Tips & Tricks)


This will make the command prompt open, and then close, in the Menu Bar; instead of the screen!!!

Now Click the Finish Button.

All you have to do is find and select a great Icon image to drop on this new power Button.  :Thmbsup:

But Wait:
You say you saw more options in the Command window  :o
Well you are correct!
http://img63.imageshack.us/img63/1696/screenshot23201094107am.jpg
Adding "Power Options" for Windows OS (Tips & Tricks)


There are options you can tag on. So I will show you what to do to add these options.
I am going to add a timer to my restart.
http://img51.imageshack.us/img51/4237/screenshot232010110418a.jpg
Adding "Power Options" for Windows OS (Tips & Tricks)


Warning here:

Make sure you are aware of what the options will do, so it does not come back to haunt you.
The timer will create a "Forced Shutdown" situation. This means that anything that is not save is lost!!!


Read the description carefully:
/t xxx            set the time-out period before shutdown to xxx seconds. The valid time-out range is between 0-315360000 <10 years>, with the default of 30. If the timeout period is greater than 0, the /f parameter is implied.

So we are warned that the "/f Parameter is implied"
So what os the "/f" Parameter.
Let us refer back to the command window and the Shutdown options:
http://img51.imageshack.us/img51/6349/screenshot232010111415a.jpg
Adding "Power Options" for Windows OS (Tips & Tricks)

/f   Force running applications to close without forewarning users. the/f parameter is implied when a value grater than 0 is soecified for the /t parameter.

We find that "/f" is a command for a "Forced" shutdown. This means that any open and unsaved applications will be shutdown without warning.
So make sure and read the full description and know what the additional parameter is going to do!!!

That being said, let us move forward:

In order to add the timer...I must add:
/t xxx
where is "xxx" is the time variable.

I want to stall for 15 seconds.
so; xxx=015

My code will be:
/t 015

I will enter this to the "Arguments" line in the "Item Settings"
But how to enter it???

There is a simple rule of thumb:
"Unless other wise stated by directions, Always add a space!"

So we will need to add a space after "/g", then add "/t 015"
So my Command Line Code in the Argument will look like:
/g /t 015
http://img710.imageshack.us/img710/6374/screenshot232010112708a.jpg
Adding "Power Options" for Windows OS (Tips & Tricks)


Now Click Finish, and add a nice Icon for your new Power Button  :Thmbsup:
remember if you use the example above, and you have not saved your work: YOU WILL LOSE IT!!!
As defined by the shutdown parameters.


In Closing:
The Command Line Arguments and Parameters are incredibly powerful, but can be dangerous as well.
Read well the descriptions, and know what is going to happen.
Mind the lettering case, as this has messed up more than one person.

I will be doing a lot more tutorials, utilizing 3rd party addons, and quite a few of these will need Command Line Arguments.
So I started this tutorial with what is to come in mind.
I will be showing you how to control Winamp, Hide your Desktop Icons, Foobar200 control (as soon as I get it all ironed out), and so much more.
These will all have command line arguments targeting their individual programs.

Over twenty years of computing has brought me to this point, and has opened me up to what Circle Dock can do.
I will pass this knowledge on to you, as I can.

It was fun doing this tutorial.
If you have a Tips n& Tricks tutorial you want to share, please do not hesitate, share with us all.
I am not a know-it-all.........Yet!

Have fun

The Sarge

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,900
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Adding "Power Options" for Windows OS (Tips & Tricks)
« Reply #1 on: February 03, 2010, 01:23 PM »
very nice walkthrough!

by the way in addition to normal, minimized, maximized, there is also a "Hidden" execution mode that may not be added to the program yet.  might want to add that so it doesn't even flash on toolbar.

sgtevmckay

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 838
  • Magis Esse
    • View Profile
    • Rainmeter
    • Read more about this member.
    • Donate to Member
Re: Adding "Power Options" for Windows OS (Tips & Tricks)
« Reply #2 on: February 03, 2010, 02:53 PM »
very nice walkthrough!

by the way in addition to normal, minimized, maximized, there is also a "Hidden" execution mode that may not be added to the program yet.  might want to add that so it doesn't even flash on toolbar.

Oooh...we have to have that option

Thanks Mouser  :-*

Markham

  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 404
    • View Profile
    • Circle Dock
    • Donate to Member
Re: Adding "Power Options" for Windows OS (Tips & Tricks)
« Reply #3 on: February 04, 2010, 01:38 AM »
Oh flip me!

Do you want all the SW_SHOW variants as well?!!  :P

Markham

  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 404
    • View Profile
    • Circle Dock
    • Donate to Member
Re: Adding "Power Options" for Windows OS (Tips & Tricks)
« Reply #4 on: February 04, 2010, 06:28 AM »
I believe this is what you want :)

CD-1.pngAdding "Power Options" for Windows OS (Tips & Tricks)


It's in!



Mark

sgtevmckay

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 838
  • Magis Esse
    • View Profile
    • Rainmeter
    • Read more about this member.
    • Donate to Member
Re: Adding "Power Options" for Windows OS (Tips & Tricks)
« Reply #5 on: February 04, 2010, 12:07 PM »
Yes Yes  :-*

Archon of Fate

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 174
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Adding "Power Options" for Windows OS (Tips & Tricks)
« Reply #6 on: February 05, 2010, 12:51 AM »
Nice! I have got to do this! where did you get the power option icons though?

sgtevmckay

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 838
  • Magis Esse
    • View Profile
    • Rainmeter
    • Read more about this member.
    • Donate to Member
Re: Adding "Power Options" for Windows OS (Tips & Tricks)
« Reply #7 on: February 05, 2010, 01:40 AM »
I found the set through deviant art, years ago, and I do not even remember from whom, or the artists name.

I do have them packaged:
Vista Switch Icons

Have fun  :Thmbsup:

Archon of Fate

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 174
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Adding "Power Options" for Windows OS (Tips & Tricks)
« Reply #8 on: February 05, 2010, 09:35 AM »
thanks  :Thmbsup:

Archon of Fate

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 174
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Adding "Power Options" for Windows OS (Tips & Tricks)
« Reply #9 on: February 05, 2010, 10:34 PM »
I don't want to be annoying, but where did you find that nice toolbar?
screenshot232010105054a.jpg

sgtevmckay

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 838
  • Magis Esse
    • View Profile
    • Rainmeter
    • Read more about this member.
    • Donate to Member
Re: Adding "Power Options" for Windows OS (Tips & Tricks)
« Reply #10 on: February 05, 2010, 10:40 PM »
That is...I am embarrassed to say....ObjectDock+, a Tab'ed bar....I recently re-installed it for ...shall we say; testing purposes
The skin comes from wincustomize. I could find it if you wish.
I do not recommend OD+ to anyone...ever!

If you are looking for tabs, and want to dev your own graphic backgrounds for it...I would suggest looking into sTabLauncher:
http://stablauncher.com/

Maybe no where as sophisticated, but very small and clean, and at least it is actually being actively developed....when the programmer is on school break  :Thmbsup:

Archon of Fate

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 174
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Adding "Power Options" for Windows OS (Tips & Tricks)
« Reply #11 on: February 05, 2010, 10:51 PM »
thank you stablauncher looks pretty good to use, my current tabbed launcher (workshelf) was almost out of trail and I wasn't looking to buy it. personally why buy it when there is so much open source programs out there for free :). As for Object dock... I know what you mean it was pretty good when I used it but it seems to take up a bit of memory. I'm rambling, so I'll just say thanks  :Thmbsup:

sgtevmckay

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 838
  • Magis Esse
    • View Profile
    • Rainmeter
    • Read more about this member.
    • Donate to Member
Re: Adding "Power Options" for Windows OS (Tips & Tricks)
« Reply #12 on: February 05, 2010, 11:00 PM »
 :P :Thmbsup: