BINARYBB.info – John Galbraith » Windows



 07 Sep 2010 @ 2:24 AM 

It started out back in the Windows NT and NT Server days when we made that central network dumping ground. I remember mapping that 10GB drive for the text files and word perfect documents to be stored. It was great. The vision of no more floppy disks stacked up on desks and people accidentally taking the data home in their pockets. The idea of a central drive that we could all dial up into the LAN and get to.  I remember walking around to all the computers and mapping that drive on each individual machine.

Well,  Windows 2000 came out and Active Directory began the beast. We had these servers with 3 36GB drives in a RAID config Wonderful design and fast! We came up with these batch files to map several drives on different servers. Then 73GB drives came out, then 136GB. Unreal data storage and the company just grew into it. We were now using Office 2000 and SQL 2000 that was generating reports in xls and doc formats, then we figured out how to make pdf files from the SQL server and the data blew up out of control. But, everyone was able to get to their drives and their department’s data.

Then came Windows XP, Office 2003, and Windows Server 2003 with Active Directory 2003 functional level. We turned one of those servers into a centralized print server for our 35+ network printers and switched all the login scripts to vbs format allowing us to map printers on login along with mapping drives and doing several other nifty tricks.

Along comes Vista and Improved Vista (Windows 7). Damn it. Suddenly, those scripts are blowing up in our multi OS environment. Do we upgrade everyone? Hell no, some of the legacy software will not run on the newer OS and you have to have Professional or Ultimate to join them to the domain.

We need to map drives and we need to map printers. We can’t map drives with vbs and can’t map printers with batch files the same way on Vista, XP, and 7.  We only have one spot in AD to specify a login script.  Now what?

Here is the solution:

Use both vbs and batch files. Plug the VBS script into Active Directory and have it call your batch file with your old style net use commands in it. It it timeless and works on all the operating systems. Then, map the printers in the script and you are done. This method is actually faster to map the drives then using scripting host and easy to do. Here is the code for your vbs script: IN RED

‘Declare your network object for your printer mapping
Set wshNetwork = CreateObject(“WScript.Network”)


‘Call your batch file to map your drives
Set oShell = CreateObject(“WSCript.shell”)
sCmd = “drives.cmd”
oShell.Run sCmd, 0, False

‘Map your printers
wshNetwork.AddWindowsPrinterConnection “\\G2K3SVR2\HPLJ6MP_Basement”

‘Set one of those printers as default
wshNetWork.SetDefaultPrinter “\\G2K3SVR2\HPLJ6MP_Basement”
Here is the code for your drives.cmd batch file. IN BLUE
@echo off
rem Delete this drive if it is already mapped.
net use /D i:
rem Map the drive
net use i: \\servername\sharename
Repeat these two steps as many times and you need drives in your batch file. Now, if you have multiple departments and need multiple scripts that is fine. You can call the same batch file for all your departments and map all their different shares with one file. You will have a different vbs file for each department but one batch file. Here is how.
Since there are no case statement is batch file scripting, we are going to have to use if statements with goto. In addition we are going to be fed a parameter from the vbs file that called the batch file and use it by calling %1. Don’t use spaces in your parameter names or you will have to call %2. They are space delimited. IN GREEN
Use parameters like group names: sales, engineering, shop, it, admin, security. You get the idea.
@echo off
if %1 == sales goto sales
if %1 == engineering goto engineering

:sales
net use /D i:
net use i: \\server\salesIdrive

goto eof

:engineering
net use /D i:
net use i: \\server\engineeringIdrive

goto eof
Instead of declaring “drives.cmd” in your vbs file you will put “drives.cmd sales” to pass the parameter into the batch file. That is all there is to it.
Happy coding. :-)
Posted By: John
Last Edit: 07 Sep 2010 @ 02:24 AM

EmailPermalinkComments (0)
Tags
Categories: Networking, Server, Windows
 23 Dec 2009 @ 6:40 PM 

Now my USB devices work, now they don’t. WTF. This is a problem I have been having since I installed Windows 7 on my laptop. Now, the laptop is a Compaq Presario V2000 with an AMD Semperon CPU an 1GB of RAM. The operating system runs like a dream, it is just that the USB functionality is intermittently troublesome and at times more unstable then Charles Manson on crack. Would I still recommend Windows 7 to other users? Absolutely. It is still great. It is just a little buggy the way it handles USB devices.

Posted By: John
Last Edit: 23 Dec 2009 @ 06:40 PM

EmailPermalinkComments Off
Tags
Tags: ,
Categories: Unresolved Issues, Windows
 14 Dec 2009 @ 2:06 PM 

[polldaddy poll=2385217]

Cast your opinion on Windows 7.

Posted By: John
Last Edit: 14 Dec 2009 @ 02:06 PM

EmailPermalinkComments Off
Tags
Tags:
Categories: Windows
 14 Dec 2009 @ 10:59 AM 

You wouldn’t use a screwdriver to hammer in a nail. Why do people use Microsoft Excel to store data? This is ridiculous. Excel is for manipulating and displaying existing data. It’s abilities to link to a database is superior to most other programs, it has great function and formula capabilities and yet has a terrible flaw. If you highlight information in the Excel spreadsheet and sort it, it will only sort what is highlighted. So, if you have a large spreadsheet with 5000 lines of inventory on there that has 15 pieces of information for each line, you could potentially mix up all your data rendering your spreadsheet data useless. You could also delete a cell and shift all data in that column up or in the row over.

SQL (Access, MySQL, MSSQL, Oracle, etc, etc, etc) operates differently. SQL has a set number if fields in a record. The data us unable to shift in SQL because each piece of data has record integrity. Use Access to store data and Excel to manipulate data.

Word. STOP USING WORD TO STORE DATA AND MAKE SPREADSHEETS! It will do it, STOP IT! Write papers, memos, resumes, and stuff like that. Let Excel do the calculating and Access do the storing.

Powerpoint…… Personally, I believe that powerpoint needs to be uninstalled from everyone’s computers and they need to seek other ways to relay information. Make videos, podcasts, use the white board or chalk board, pass out pictures, pass out items, do a demonstration, SOMETHING! Death by powerpoint is getting a bit old. There is nothing wrong with a little powerpoint presentation. Ask yourself something though, if I took out the powerpoint in my class or meeting, can I teach the class flawlessly or will it fall apart. If it will fall apart, you are guilty of death by powerpoint. Seek other methods of teaching in conjunction with your presentation slides.

Start thinking about the tools you are using on your computer. Are you using the for what they are intended for? If not, do you really think you are effectively and efficiently using your computer? Think about it.

Posted By: John
Last Edit: 14 Dec 2009 @ 11:00 AM

EmailPermalinkComments Off
Tags
Tags: , , ,
Categories: Office, Windows
 09 Dec 2009 @ 6:10 PM 

ARMY USERS, LISTEN UP!

If you go into the CAC resource center in AKO you will notice a statement that ActivClient will not work with Windows 7 32bit edition. This is not entirely true. If you are thinking about plunging into Windows 7 and you are in the Army, spend the extra $40 and get Windows 7 Professional. This is key because you are able to run programs in Windows XP mode.

Simply download the ActivClient software from AKO. Then right click on it and go to properties and compatibility. Run the software as Windows XP SP3. Then go into the installation directory in C:\Program Files and sort by type. This will put all the exe files together. Do the same for all the exe files. Go into compatibility and run them as Windows XP SP3. When you are done, reboot. When you come back up. Plug in your card reader and install the drivers for it. This is done automagically in Windows 7. Now insert your CAC card and go to AKO. That’s all there is to it.

Enjoy

Posted By: John
Last Edit: 09 Dec 2009 @ 06:17 PM

EmailPermalinkComments (1)
Tags
Categories: Security, Windows
 05 Dec 2009 @ 6:03 PM 

Windows Live Mail is an outrage. Unstable, freezes on start up, easily corruptable, slow, and over complicated with all the extra menus and crap they added in. You might as well use Outlook. The problem with that is, OUTLOOK DOESN’T DO NEWSGROUPS! That sucks royally. Especially for me, my university runs their forums from a news server.

Windows mail came with Vista. Ya, Vista sucks (memory pig) but Windows Mail was actually very nice. Guess what? Windows 7 doesn’t come with a mail client. No more Windows Mail, no Outlook Express, nothing. WTF? And the options you have is Windows Live mail or Thunderbird. I am not a fan of either.

Here is what you do. Go to a Vista machine and navigate to C:\Program Files. Then right click on the Windows Mail folder and create a zip file. Port that file over to the Windows 7 box.

Now in Windows 7, navigate to C:\Program files and right click on the Windows Mail folder. Go to Properties and security. Click the Advanced button and go to owners. Take ownership of the directory. Now, change the permissions giving yourself full control over it. Now, rename or delete the directory. Unzip the contents of the Windows Mail zip file from Vista into Program Files on Windows 7. Now the Windows Mail folder is back. Make a shortcut on the desktop for the Executable for Windows Mail. It is like winmail.exe or something like that. Tada, you ported Windows Mail to Windows 7.

Now, set up your email and newsgroups. Enjoy.

Posted By: John
Last Edit: 05 Dec 2009 @ 06:03 PM

EmailPermalinkComments (1)
Tags
Categories: Hacking, Windows
 01 Dec 2009 @ 11:52 PM 

Sure it will. The drivers have been moved to Windows Update. I have an HP Laserjet 6MP that dropped off of the printer list when I try and add a new printer. No problem. Many websites tell you to press the button to search windows update. The problem is that button doesn’t exist in the initial interface. So, here is what you do. Install the wrong driver that IS on the list. Then go into the printer properties and install a new device driver. This brings up a new and improved printer addition wizard that has the button to search the Windows update database. Click the button and wait about 5 to 10 minutes for the update to finish. This is downloading the legacy drivers for printer. Now, you will notice a whole lot more printers on your list. Pick the printer you want ( in my case it was a LJ6MP) and delete the incorrect driver from the list. There you go.

Posted By: John
Last Edit: 02 Dec 2009 @ 11:05 PM

EmailPermalinkComments Off
Tags
Tags: ,
Categories: Windows

 Last 50 Posts
Change Theme...
  • Users » 193
  • Posts/Pages » 38
  • Comments » 6
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

About



    No Child Pages.

Chronicles



    No Child Pages.

WSL



    No Child Pages.