ASP.NET

20 05 2009

seems to be AMAZING!

Pretty much the same functionality as the standard Windows .NET framework…  Its so much easier than Javascript (mainly coz of Visual Studio :) ) And I personally find it slightly better than PHP too… well I am yet to find out how to do SQL stuff in it… but again, something nice is bound to exist :)

The Button Drag Drop thing is AWESOME! So are the text boxes and all the other things… IIS has little configuration to meddle with and Visual Studio just publishes it all with dlls directly into that folder :)

F5 previews the web-page in a virtual server by Visual Studio…. Man, this is really good…. I mean DreamWeaver was made solely for this purpose and Visual Studio (meant in my opinion more for system application development) is able to do the same things… now if only they can add full CSS support… that would be marvellous…

EDIT: IT DOES HAVE FULL CSS SUPPORT!!





Hidden Windows Share

20 05 2009

The nice thing about domain accounts is that if you have logged into another comp using a domain accout, it CREATES an account on that system. Next time you access that comp using windows share, it lets you see your profile data directly :)

Now, if you have admin privileges on that comp (or maybe even otherwise)… you basically get to see ALL the data on that comp… now although these things may not show up when you do a \\computer-name in explorer, here’s what you can do

\\computer-name\C$

Basically, add a $ at the end of C … this will show you contents of C:

Another neat trick is \\computer-name\ADMIN$

that opens up the windows folder (note you cannot exactly use %windir% coz that will be the local system variable :) )

Neat na? Of course it is.





Pstools

20 05 2009

http://technet.microsoft.com/en-us/sysinternals/default.aspx

Sysinternals was a company founded by one person. They made awesome software that was able to meddle with intricate windows stuff… so, M$ bought it :) (kinda expected)

Anyway, the point of this post is basically psshutdown.exe. This exe is kinda neat. It lets you Shut Down, restart, standby, hibernate and do other things to your computer and even a remote computer. M$’s shutdown.exe that comes bundled with all comps cannot standby or hibernate (it can do the other things on a remote system too, but it uses the same account credentials as the user running it even on the other system… and that user needs to be admin on the remote system)

The other way to accomplish standby and hibernate is to do this

rundll32 powrprof.dll SetSuspendState Hibernate
rundll32 powrprof.dll SetSuspendState Standby

Programmatically, there will be a Win API exposure to powrprof…

But coming back to psshutdown, the way I think (and proved) it works is

1. It takes in username/password of remote system from command line

2. Uses windows share to copy itself (actually a smaller copy with some other name) onto the remote system’s system32 folder… (another fun thing here to be described in another post)

3. Registers this copied exe as a service and starts it to do stuff

Seems like a long way to do things right? Yeah, I guess it is… there is also something called WMI… but that needs special firewall exceptions (Atleast with the group policy that I am working with)… if you use WMI, then Win32_OperatingSystem or Win32_Process can be used… again, the Win32_OperatingSystem Win API Class does not let you standby or hibernate… so use process to do the rundll32 thing….

It took me ONE FULL FREAKING DAY to figure that out… (that and the fact that I almost had a fully functional WMI apsx page and then decided not to use that… and was then told to use psshutdown… and then continued and found out this :) )

3rd day :)





WOL

20 05 2009

After having dabbled with it for some time in college, I finally got a chance to “work” on it… Guess M$ is my first employer :) Working to make an ASP.NET application for remotely doing these things… A few findings may find their way into this blog… In general, IT WORKS!!! (although within the same subnet)