Jump to content

First timer


Yomer333
 Share

Recommended Posts

Note:

If this topic is in the wrong section or irrelevant to the AutoIt community at large, feel free to move/delete.

Ok, a little background. I'm a student worker for the network engineering department at a university, and every year, we try to help as many new students moving in get their machines reasonably secure, i.e. firewall/updates/etc. Last year, a few weeks before people started moving in, my boss asked if there was any way to streamline this process. I said I could write a batch file to cover the simple stuff like firewalls and such. As time went on, they wanted more and more stuff, and I ended up with a frankenstein-y mess of batch files and .js scripts. Since Vista was first becoming more common at that point, UAC threw a wrench in the works, and made things even more hack-y. It was tolerable, but generally pretty yucky to use. This year, I got a headstart, went with AutoIt, and actually threw a GUI on top.

I don't have any specific problems I need help with as the deadline for this project was a few days ago, so any changes I make will be for next year. This Friday will be the first major use day (50 or so workers/volunteers using it on many hundreds of computers), but I've tested this damn thing on more virtual machines than I can remember because I didn't want to get blamed for hosing student's computers.

Screenshot of the vista version of the batch file menu I made last year (I know, it's pretty pathetic.)

Posted Image

Screenshot of the new one I made (it looks pretty dark gray because the machine I used to take the screenshot is kind of goofy)

Posted Image

Clicking a button makes it compliant with the university's requirements, i.e. clicking the firewall turns it on, clicking Spybot for example will install Spybot and update it to the newest version, etc.

I'll post the source if anybody actually cares, but I'm mostly just an AutoIt noob looking for encouragement or criticism since the people I work with aren't really programmers, and don't know how long it took to make something like this.

Long post is long.

Link to comment
Share on other sites

Looks really nice! Could you post the source because we have a lot of l33t scriptwriters on this forum and we might just be able to make it faster and more efficent.

Ta da.

https://netweb.it.siu.edu/timmy/rezcheck.au3

The comments are pretty rough (read:almost non-existant), and I plan to go through it after this weekend (working 40 hours between Friday/Saturday/Sunday). Also, there are a few parts that I know seem really inefficient, but it was the only way I could get it do what I needed. For example, there's a section that deals with checking for peer to peer apps (I know, communist overlords and such...it's a bandwidth issue). Anyway, I originally had it only display the name of a program if it found it, but after showing my boss a more elaborate version that showed everything, and then red/green based on status....he decided that one was "cooler", so I went with that even though it was much, much longer.

Some stuff that I've already thought of that I wished I had added is adding a button or something that would set the machine to DHCP and clean up leftover P2P app registry stuff after an uninstall (both of which I know how to do and are pretty easy, I just didn't think of in time.)

I'll update this thread after it actually gets used. Hopefully it's a "Wow, it actually worked" update and not a "I've been fired/expelled/imprisoned" update.

Edit: I guess I should mention I did the GUI by hand. I see now that there are some drag-and-drop type things on this forum, but I didn't notice them or didn't trust them at the time. Are they actually useable/worthwhile?

Edited by Yomer333
Link to comment
Share on other sites

Edit: I guess I should mention I did the GUI by hand. I see now that there are some drag-and-drop type things on this forum, but I didn't notice them or didn't trust them at the time. Are they actually useable/worthwhile?

The Koda designer is highly recommended! http://www.autoitscript.com/fileman/users/lookfar/formdesign.html
Link to comment
Share on other sites

In place of all the if staements you cound have used switch and case.

Yeah. A lot of this could probably do for a rewrite. Most of that stuff started out as "Ok, I need to do this now..." and then a few days later "Oh, I guess I need to check for this....and now this...and here's this other thing", so the if's kind of got out of hand in some cases.

Link to comment
Share on other sites

Alright, so first day is done. We worked on about 400 machines today, and as far as I know, my program didn't completely host any machines. The only issues I noticed today were that Vista isn't very good at reporting its firewall status compared to XP, and having an on-access virus scanner like McAfee really slows down Offline Updater. Other than that, no major issues. Tomorrow and Sunday should be worse, so we'll see.

Link to comment
Share on other sites

  • 2 weeks later...

Ok, so our move-in festivities are over. Overall, it was a resounding success. I got compliments from lots of people, and everyone was generally appreciative.

A few notes/problems:

Some things I wish I had added are the McAfee Removal Tool and Norton Removal Tool. People were asking for my flash drive all weekend because the built-in McAfee/Norton installers leave all kinds of junk in the registry and such. I included checks to make sure people didn't install multiple AV products on top of each other because then it's a mess to fix.

I wish I had added a button to open an administrative command prompt in Vista, because just opening cmd.exe doesn't allow you to do commands like ipconfig /renew or adding/deleting routes.

One thing that I'm not sure about is setting the "Local Area Connection" nic to DHCP. I haven't really tried it yet, but it would seem that if someone renames that network connection to "LAN" or "Hardwired Connection", it'll make stuff not work. Similar to the problem with not knowing which address @IPAddress1 will return.

I'm graduating in December, so I won't be able to work on the program next year. I'm trying to compile a list of stuff to change/rewrite/add before I leave.

Link to comment
Share on other sites

One additional note:

A lot of the lan admins on campus asked if they could have one of the cd/dvd's just for use on the machines they're responsible for. My original task that led to the cd was trying to have some sort of activeX webpage that would allow someone to click "Turn on firewall", "Turn on auto-updates", etc. After further review, ActiveX sucks. I decided having a standalone executable that they could download would work better since it's browser-independent. My first version of this autoit script used wget to download installers in the background. The compiled program included wget and a few dll's, so it was ~1mb. They could click a "Install program X" button, and it would download the program X installer from a webserver we had running. Since some of the lan administrators asked for a copy, I'm thinking of going through and changing all of the install buttons back to using wget.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...