Showing posts with label Windows 8. Show all posts
Showing posts with label Windows 8. Show all posts

Saturday, January 10, 2015

Fast way to open CMD or Powershell from Windows Explorer

 

This is an amazing tip I found as a comment on the Rick Strahl’s Web Log (by peSHIr).

So, I’ve usually used Shift + Right Click to get to the “Open Command Window Here” option in the menu. It works, but the following tip is much nicer.

Just type cmd or powershell (overwrite the existing path) in the path field of the Windows Explorer, and hit Enter.

That is it! The cmd will just open directly in the path you were browsing in your Windows Explorer.

Great tip!

 

Thanks peSHIr

Tuesday, October 28, 2014

C# Creating a windows scheduled task inside a folder

 

Introduction:

Recently I needed to work with windows scheduled task, and noticed that it is possible to consolidate/organize the tasks inside tasks scheduler in folders. Essentially a possibility to consolidate the tasks by topics or vendor.

image

In order to work with task scheduler I’m using the Task Scheduler Managed Wrapper, by David Hall, available from taskscheduler.codeplex.com or as a nuget download.

Sub Folder management:

So it took me a minute to understand that sub folder collection and all the related functions are located under RootFolder and not available as immediate TaskService children.

TaskService taskService = new TaskService();
 if (taskService.RootFolder.SubFolders.FirstOrDefault(x=>x.Name=="MyFolder")==null)
                {
                    taskService.RootFolder.CreateFolder("MyFolder");
                }
...

taskService.RootFolder.SubFolders["MyFolder"].RegisterTaskDefinition("MyTask", taskDefinition);

You need to check for existing folder with the same name, calling CreateFolder with existing name will throw an exception.

Thursday, October 16, 2014

New (for me) Windows shortcuts

 

All tested on Windows 8 and 8.1

 

Ctrl+Shift+ESC – Opens Task Manager

Ctrl+Shift+Right Click on the Taskbar – adds “Exit Explorer” option to the context menu.

image

Win+X – opens a very useful menu with menu shortcuts. (this one is not very new, but some people don’t know about it - I use it every day)

ScreenClip

Friday, December 21, 2012

Always run Visual Studio as administrator under Windows 8

This is a default state for many developers and this functionality is available under properties menu in Windows 7 but has vanished in Windows 8.

In order to enable VS running as administrator in Windows 8:

you have to right-click devenv.exe and select "Troubleshoot compatibility".

1. select "Troubleshoot program"
2. check "The program requires additional permissions"
3. click "Next", click "Test the program..."
4. wait for the program to launch
5. click "Next"
6. select "Yes, save these settings for this program"
7. click "Close"

Source: http://stackoverflow.com/questions/12257110/can-you-force-visual-studio-to-always-run-as-an-administrator-in-windows-8