Monday, March 22, 2010

Windows Steady State and nostalgia

If you work in an environment where there is one computer and multiple users, and there is more than one user with admin rights to that computer, you might have seen the need for Windows Steady State ( http://www.microsoft.com/windows/products/winfamily/sharedaccess/default.mspx ).

It "freezes" the configuration on a Windows XP or Vista computer so if there is a change made to it a reboot will restore the computer back to the standard "frozen" state.  If you have kids who use your computer and you don't want to mess with things like admin accounts and family configuration control boards, this tool is for you.  It is free for valid (genuine) windows installations.

In the nostalgia column, did you know AngelFire was still up and running?  The good old days of free web hosts with banner ads are still here.  Who knew?  But I would not recommend going there ( http://google.com/safebrowsing/diagnostic?site=angelfire.com ) it is still a den of viruses and malware.. but it is nice to know that some things don't change.


Friday, March 19, 2010

CACLS in a Batch File

I was working with permissions in a directory and remembered the command CACLS to change permissions. I needed this in a script but it ran and prompted the user for a "Y or N". This would not be good since I inteded to run the script on a scheduled task and there would be no one to press Y or N when the script ran. There is not a "/Y" option for CACLS, which would normally automatically answer "Y". Instead you have to run the command like so: " echo y| cacls folder /g everyone:F ". The spacing is important because with a space after the Y it would cause CACLS to fail (CACLS is apperently looking for just "Y" and not "Y+(space)".

Wednesday, March 17, 2010

Installing Sun Java on Fedora 12 and making it work on Google Chrome

So, Google Chrome on Fedora is great, but getting Java on it is hard.

The problem is that Fedora is that they only have Open Source
installed by default, normally this is cool but not everyone uses
totally open source all the time. Sun Java programmers are some of
those people. I have a big, huge (kinda sick) love for "Flame"
(http://www.escapemotions.com/experiments/flame/#top) but it requires
Java..

So here is how I got Java to work on my Fedora 12 install:

1) Download Java from Sun..
2) Sun will give you a ".bin" file (yeah, WTF!?!)..
3) Now you have to open a console, change to the directory where you
don downloaded Java...
4) chmod a+x jre-6u18-linux-x64-rpm.bin
5) now you ./jre-6u19-linux-x64-rpm.bin
6) read the EULA and type "yes"

Java is now installed in /usr/java, the trick now is to let Google
Chome know about it.

7) in the console window as su, go to /opt/google/chrome/plugins
8) make a link to the java browser plugin library: ln -s
/usr/java/default/lib/amd64/libnpjp2.so

restart Google Chrome and give it a try!

Tuesday, March 16, 2010

Restore ZIP File/Compressed Folder in XP after WinZIP Removal

I am not sure your opinion of WinZIP but I am done with it (I have
been since Windows XP was launched). The native "Compressed Folder"
functions of Windows XP were just better than WinZIP, even if you
could specify a higher compression with WinZIP Zip files.

No matter your opinion, many users still install WinZIP without buying
it. I am not one to violate license agreements, if you must install
some ZIP tool install 7zip at least, so I have removed a few installs
of WinZIP in my day. WinZIP just happens to burn a bridge on the way
out of the system and not restore the ZIP functionality of XP --
almost like throwing the bird to your boss as you are walked out by
security after getting fired...

To restore the native ZIP file functionality in XP (maybe Vista for
all I know) the following works for me:

1) Open a command prompt and run: REGSVR32 ZIPFLDR.DLL

2) then run: assoc .zip=CompressedFolder

3) you are done!

Script to bind/enable network clients to adapters

I had an issue where there are a bunch of machines which need to join the domain. The problem is that the "Client for Microsoft Networks" was disabled on the image for these machines.

Since there are so many and I am very lazy, I wanted a script to enable the ms_msclient..
but finding none I tried to locate how to do it in the registry..
but finding no way I changed the setting and watched the results in ProcMon..
but finding nothing I went to find a scriptable application to use..

then I found nvspbind ( nvspbind ). Now I can make a script that calls this little command line application ( the "XP" version worked for me -- I don't get the distrobution files on the web page). A BIG thank-you to Keithmanage ( keithmange )!!

Tuesday, November 17, 2009

Friday, November 13, 2009

Railo Coldfusion

Need to write a realistic yet insecure web application for a class in
December, looks like I will use Railo for it.

Thursday, November 12, 2009

Sun Virtual Box

Better than VMWare Player and MS Virtual PC! Host a virtual machine
tonight with VirtualBox (http://www.virtualbox.org)

Friday, November 6, 2009

Wine and Adobe

It looks like my Flash CS4 will not work on Linux with Wine. Is it
worth it to ditch Windows full-time?

Tuesday, November 3, 2009

Elections

Nothing like the smell of "republican sample ballots" to make you fill
in those "D"s...

Friday, October 30, 2009

Simple Modal and Mu for Facebook Connect

If you are into JavaScript and Jquery, Eric Martin as a great Simple
Modal Window library out (
http://www.ericmmartin.com/simplemodal-1-3-3-released/ ), and Mu (
http://mu.daaku.org/ ) is great for adding FaceBook Connect to any web
page. Finally you can add a modal window that can allow a user to
sign into Facebook from a blog and manage their friends...

What an amazing world!

Wednesday, October 14, 2009

JQuery dependent form field validation

At work I use a lot of JQuery. It is amazing, I can't even remember
the days when I'd write my own form validation or other such heavy JS
code. 99% of the time JQuery is amazing, but that last 1% is when you
have pushed too hard and are in a corner with a deadline approaching..

Such is the case with a recent project. I had a form which had
several fields on it. To help "Joe User" (when "User" means "Pothead"
or other such lower form of life), we changed the page from two forms
which beautifully inserted data into separate tables to one monster
form that submitted data to a controller which decided which data went
into which table.

There was the equivalent of shipping address information on the top
and items to be shipped on the bottom. The address information might
be updated separate from the shipping data on the bottom. The problem
is that the bottom part of the form would be blank, which the
controller can handle (if blank, don't insert it -duh). The problem
is that in validation, a shipping item might need to have a item
number and price but making them required would trigger a validation
problem when just hitting submit after changing the address.

So I needed the required shipping item information to be required when
filled in, but ignored otherwise. The trick is to use the "rules"
block inside the form.validate() statement, and add a function that
returns true or false to set or unset the fields to be required. I
finally found the answer in the JQuery Docs (
http://docs.jquery.com/Plugins/Validation/Methods/required#dependency-expression
). I did the copy-paste-alter thing and violah! It didn't work...

WHY! Hours had turned to days on this one issue.. and it still would not work!

Ok, I calmed down and found out the following is IMPORTANT:

- Name and ID synchronization: Do yourself a favor and keep the form
inputs' names and IDs the same. The $("#name") is obviously the ID
but less obvious, the rules block in the Validate method point to the
input's NAME. Keep them the same and life is good.

- JavaScript form submission: It is what the cool kids are doing, but
it can interfere with the form validation. When the regular submit
button was pressed the form validated and would error properly. When
the JavaScript based link was used the form would error but submit
anyhow. Not great because that allowed bad data to be inserted into
the database.

So, I wish you all good luck and hopefully you will read this and say
"pft, I am no idiot, I knew that" but you have that luxury at this
point, I would have said the same thing (as I took note of this
advice).

Popular Posts