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

Monday, February 18, 2013

XNA Visual Studio 2010 Direct3d Issue - Solved

I was trying to run some code in Visual Studio 2010 using XNA framework, but I was required to run using HiDef profile. Running my code in Refresh profile was not working due to some buffer indices issue. Here is a screenshot of error I was seeing after building project and trying to debug when setting profile to HiDef:


I looked all over the internet for error, "No suitable graphics card found. Could not find a Direct3D device that supports the XNA Framework HiDef profile...." I kept finding suggestion to change project property to refresh, but this was not good enough. 

Solution:
Here is how I solved my issue. I was trying to build from a laptop (ASUS) which has two graphic cards, Intel and Nvidia. Turns out something is up with Intel graphics drivers and when you run Visual Studio 2010 it throws the problem above. When I tried to run VS2010 by right clicking on desktop application on icon and choosing "Run with graphics processor" -> "High performance NVIDIA processor", my project compiled using HiDef profile.


Hope this helps you guys looking to run HiDef profile.

Saturday, December 17, 2011

Automatically Shutdown Windows 7 / XP through Command Prompt

There have been many times where I wish a program would shutdown my computer once it has completed its processes. Unfortunately, some programs do not have this option. The following command which is executed in the command prompt will allow you shutdown windows with also the possibility to restart the OS.

If the following code is copied into your command prompt, it will shutdown the computer at 6:30pm
at 18:30 shutdown -s
To confirm task has been added, just type "at" in the command prompt, and you will see the scheduled tasks. If you would like to remove the job type:
at [id] /delete 
//[id] = replace with the ID number to delete
To restart windows, just add -r command. A prompt can also be given to give notification of upcoming shutdown by adding -c. The command can also be generated to work on certain days of the week. Ex:
at 18:30 /every:T,Th,F shutdown -s -r -c "Computer is going to restart!"
The code above says the computer will restart at 6:30pm every Tuesday through Friday and give the message indicating pc is restarting. Hope this helped! IMPORTANT: If this command is being issued through windows 7, please ensure you run command prompt as Administrator or else you will get "Access Denied".