Wednesday, May 02, 2007

Script: Delete a folder from every users "Network Share" A.K.A. WKSP

Script: Delete a folder from every users "Network Share" A.K.A. WKSP

Hey everyone! Sorry for the hiatus. Here is a little script I put together to delete all the "My Music" folders under WKSP. Seems like a simple enough task, until you have to do it. This script should save you a ton of time (hopefully).


Here is the code:

@echo off&setlocal
pushd c:\WKSP
for /f "delims=" %%a in ('dir /B/S/AD my*music') do del /Q /F /S "%%a\*.*"
popd
Save it as a .bat file and you are good to go!

Remember to test the script! Just add an echo before the delete command. You can see the example in red below...

@echo off&setlocal
pushd c:\WKSP
for /f "delims=" %%a in ('dir /B/S/AD my*music') do echo del /Q /F /S "%%a\*.*"
popd
Have Fun!

-Admin Bromo
Ian Lilkendey

Hot Sauce :)

Friday, January 19, 2007

Single user backup script for Lotus Notes Part 2.

Sorry I've been slammed at work and such so I have not had much time to post.

Here is the 2nd part of the single user backup for Lotus Notes.
Mind you it is nothing spectacular (but it can be very useful).
It is a simple VBS I modified from the Microsoft script center. Here is the code...

Const ForReading = 1
Const ForWriting = 2

set re=new regexp

'Opens notes.ini within the backup folder that was
'created in the first script
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\notesbackup\notes.ini", ForReading)

'Reads all the lines of the file and looks for "Directory="
strText = objFile.ReadAll
re.pattern="Directory=.+\n"
objFile.Close

'Replaces the Directory= with your desired location.
strNewText = re.Replace(strText, "Directory=C:\Program Files\lotus\notes\data" & vbCrLF & "")

'Closes up the notes.ini
Set objFile = objFSO.OpenTextFile("C:\notesbackup\notes.ini", ForWriting)
objFile.WriteLine strNewText
objFile.Close
So there it is. Post a comment if you need any help!

Wednesday, November 22, 2006

Single user backup script for Lotus Notes.

Here is a script I created to backup a users profile within Lotus Notes. It's a quick and dirty but you should get the idea.

Save this into a batch (.bat extension) file. Make sure the user can utilize reg.exe. By default it is a part of Windows XP and 2000.

I suggest running something like this at the system startup. This will avoid any corruption that may happen from the user opening notes.

I have a "replace.vbs" that updates the notes.ini with the correct install location (in case you are moving to a new box). I will post it later. *Update: You can find the replace.vbs here Single user backup script for Lotus Notes Part 2.

@ECHO OFF

REM This creates the C:\NotesBackup\data directory
MD C:\NotesBackup\data\

REM Takes us to the root of C:\
c:
cd\

REM Queries registry for the lotus notes key.
REM Determines where the files we need to backup are located.
FOR /F "tokens=2* delims= " %%A IN ('reg query HKLM\Software\lotus\notes /v Path') DO xcopy "%%Bdata\*.ID" C:\NotesBackup\data\ /Y /D
FOR /F "tokens=2* delims= " %%A IN ('reg query HKLM\Software\lotus\notes /v Path') DO xcopy "%%Bdata\notes.ini" C:\NotesBackup\data\ /Y /D
FOR /F "tokens=2* delims= " %%A IN ('reg query HKLM\Software\lotus\notes /v Path') DO xcopy "%%Bnotes.ini" C:\NotesBackup\ /Y /D
FOR /F "tokens=2* delims= " %%A IN ('reg query HKLM\Software\lotus\notes /v Path') DO xcopy "%%Bdata\Desktop6.ndk" C:\NotesBackup\data\ /Y /D
FOR /F "tokens=2* delims= " %%A IN ('reg query HKLM\Software\lotus\notes /v Path') DO xcopy "%%Bdata\bookmark.nsf" C:\NotesBackup\data\ /Y /D
FOR /F "tokens=2* delims= " %%A IN ('reg query HKLM\Software\lotus\notes /v Path') DO xcopy "%%Bdata\names.nsf" C:\NotesBackup\data\ /Y /D\

REM I will post "replace.vbs" later. This vbs allows us to update the notes.ini with the proper location.
REM wscript h:\replace.vbs

REM This makes another folder.
MD g:\notesbackup\

REM Copies c:\Notesbackup to another location.
xcopy c:\Notesbackup\*.* g:\Notesbackup /Y /E

Thursday, November 16, 2006

Adding Your Blogger Beta Sitemap to Google Sitemaps via RSS.

I kept receiving errors regarding my sitemap after I switched to blogger beta. I was using atom and apparently beta uses a different version. Until they resolve this here is a great work around using rss. I assume you have already verified your site via the webmaster tools....

1. Go to the google webmaster tools and click the "Sitemaps" tab.
2. Delete the old atom submission if you have one.
3. Click "Add a Sitemap".
4. Once you get to the "Add Sitemap" page select "Add General Web Sitemap" on the choose type drop down box.
5. Under "3. My Sitemap URL is:" add your site (don't forget the rss.xml).
Example: http://yourblogname.blogspot.com/rss.xml

Hope this helps!

-Admin Bromo

Idea originally posted here.... http://goygoycu.blogspot.com/2006/10/adding-blogger-beta-sitemap-to-google.html

Monday, October 30, 2006

How To Create a Universal Ghost Image Using Sysprep and Mysysprep

How To Create a Universal Ghost Image.
This is my guide to building a "Universal" (compatible with most HALs) Ghost Image. I will revise as needed.

Hopefully this will cover everything you need to create your own Universal Image. I have tried to cover all the issues I have run into.
With the use of "MYSYSPREP", my image names the PC via it's serial cnumber and switches the HAL based on the model.

If you have any questions or suggestions please feel free to comment.

Note*: You need to make sure you are using the Corporate version of Windows XP. If you are using a regular OEM copy of Windows you will have issues using SYSPREP. I believe after you SYSPREP an image twice it requires you to re-validate or something.

Note*: Make sure you do not install "Windows Genuine Advantage". If you have, remove it. Here are the instructions on how to... http://support.microsoft.com/kb/921914

Okay, so lets get started..

1. Do a clean install of Windows XP.

  • I usually start building the image on my slowest model PC. I have found that this really does not matter as long you change the HAL to ACPI.
  • Try to avoid installing any unnecessary drivers and make sure to utilize the ".inf" for the drivers that are required.
  • Optional: I usually create a backup image right after I install windows. This saves me time if I have to start from scratch
2. Change the HAL to ACPI.

  1. Open the I386 folder located on your XP SP2 cd.
  2. Open the SP2.CAB.
  3. Extract halacpi.dll (not halaacpi.dll) to a temporary folder and rename it to hal.dll.
  4. Extract ntkrnlpa.exe and ntoskrnl.exe to the same temporary folder.
  5. Move all three files to the system32 folder under your windows directory. Say yes to replace files.
  6. Reboot
You have now switched your PC to ACPI!

3. Apply all critical patches released by Microsoft. Again, avoid installing Windows Genuine Advantage.

4. Create a configuration checklist and follow it.


  • Note*: One of the interesting features they added to XP SP2 is the fact that when you SYSPREP your image it will copy the local admin profile to the default profile. I have mixed feeling about this but I have made it work for me. There is a patch to get around it if you need it
  • Here is a generic checklist. Add or remove details as needed...
  1. _Clear take a tour
  2. _Clear .net passport
  3. _Remove MSN Explorer
  4. _Remover Internet Messenger
  5. _Display Setting
  6. _1024 x 768
  7. _Windows Classic Theme
  8. _Set wall paper
  9. _Set screen Saver
  10. _Set power scheme
  11. _Disable hibernation
  12. _Set Taskbar settings
  13. _Set internet option
  14. _Empty Recycle Bin
  15. etc...
5. Install and configure necessary software.
  • I try to document whatever I have installed in a change log. That way we can keep track of changes.
6. Download the latest version of SYSPREP. You can find it at... http://support.microsoft.com/?kbid=838080

  • Extract "deploy.cab" to "C:\sysprep" on your image machine.

7. Download "MYSYSPREP" from here... http://jimtsay.googlepages.com/mysysprep

  • extract it into the "c:\sysprep" folder.
  • This is a hacked version of SYSPREP. Read the full description of it via the link. It works side-by-side with sysprep to add more robust features.

8. Create the following folder "c:\drivers". Make a subfolder for each of the required drivers for all your PCs.

Example.
c:\drivers\vid7600
c:\drivers\snd7600
c:\drivers\vid350
Make sure to trim your drivers down. Anytime you download drivers they usually contain a folder with what is required for windows... files with the .inf extension. Here is a screen shot of an audio driver I have.




9. You can create your own sysprep.inf by running c:\sysprep\setupmgr.exe. It will ask you a series of questions related to what you want sysprep to do. Or you can use the sysprep.inf below.

Note*: Anything I put in bold and red do not include in your sysprep.inf.

[Unattended]
;This tell sysprep to do an unattended setup.
unattendedMode=FullUnattended
OemSkipEula=Yes
;OemPnPDrivers refers to the "C:\drivers" folder you created. I trimmed this down a bit.
OemPnPDriversPath=Drivers\Snd64;Drivers\Vid6400;Drivers\Vid62;Drivers\Vid6;Drivers\mdm62;Drivers\mdm6;Drivers\snd62;Drivers\MD64;Drivers\Modem64;Drivers\TPM;Drivers\QL64;Drivers\FING;Drivers\SATA
;InstallFilesPath refers to the root in which you store everything... drivers etc...
InstallFilesPath=C:\
ConfirmHardware=No
OverwriteOemFilesOnupgrade=No
DriverSigningPolicy = Ignore
oempreinstall=yes
updateInstalledDrivers=Yes

[GuiUnattended]
;Set your local admin password here
AdminPassword=******
AutoLogon=No
AutoLogonCount=0
OEMSkipRegional=1
TimeZone=35
OemSkipWelcome=1s

[UserData]
;Put your Product Key here.
ProductKey=xxxx-xxxx-xxxx-xxxx-xxxx
FullName="xxx"
OrgName="xxx"
;This is a special added feature that comes with MYSYSPREP. ;You can have your PC named by it serial number. ;Below you see that I have it type out JAX in front of the Serial Number
ComputerName=JAX%SerialNo%

[Display]
BitsPerPel=32
Xresolution=1024
YResolution=768

[SetupMgr]
DistFolder=C:\sysprep\i386
DistShare=windist

[Identification]
;Here you can have the computer join the domain. ;Enter the crudentials of a user that has rights to do this. JoinDomain=xxx
DomainAdmin=xxx
DomainAdminPassword=xxxx

[Networking]
InstallDefaultComponents=Yes

[Sysprep]
BuildMassStorageSection=No

[SysprepMassStorage]
PCI\VEN_8086&DEV_27C1&CC_0106 = %systemdrive%\drivers\sata\iaahci.inf ; Intel(R) 82801GR/GH SATA AHCI Controller (Desktop ICH7R/DH)
PCI\VEN_8086&DEV_27C5&CC_0106 = %systemdrive%\drivers\sata\iaahci.inf ; Intel(R) 82801GBM SATA AHCI Controller (Mobile ICH7M)
PCI\VEN_8086&DEV_2652&CC_0106 = %systemdrive%\drivers\sata\iaahci.inf ; Intel(R) 82801FR SATA AHCI Controller (Desktop ICH6R)
PCI\VEN_8086&DEV_2653&CC_0106 = %systemdrive%\drivers\sata\iaahci.inf ; Intel(R) 82801FBM SATA AHCI Controller (Mobile ICH6M)
PCI\VEN_8086&DEV_27C3&CC_0104 = %systemdrive%\drivers\sata\iastor.inf ; Intel(R) 82801GR/GH SATA RAID Controller (Desktop ICH7R/DH)
PCI\VEN_8086&DEV_24DF&CC_0104 = %systemdrive%\drivers\sata\iastor.inf ; Intel(R) 82801ER SATA RAID Controller (Desktop ICH5R)
PCI\VEN_8086&DEV_25B0&CC_0104 = %systemdrive%\drivers\sata\iastor.inf ; Intel(R) 6300ESB SATA RAID Controller
PCI\VEN_8086&DEV_2652&CC_0104 = %systemdrive%\drivers\sata\iastor.inf ; Intel(R) 82801FR SATA RAID Controller (Desktop ICH6R)


Note*: I have "BuildMassStorageSection=No". This is only because I know exactly which mass storage drivers I need. If you change this option to "Yes" it will populate a huge list of storage drivers. This will make it more compatible across different hardware, but it adds a good 30 minutes to the SYSPREP process. Note*: I have included custum mass stroage drivers. This is for my Compaq laptops.

10. Once you have your sysprep.inf in place it is time to look at the "c:\sysprep\mysysprep.inf".
This files contain the information needed to switch the HAL before mini setup.

Here is an example:
[Manufacturer]
;Manufacturer Name=mfg.inf

[Model]
;Model Name=model.inf
;MP model=mp.inf
;UP model=up.inf
hp Compaq nc6000 (DD522AV)=up.inf
HP Compaq nc6230 (PU985AA#ABA)=up.inf
HP Compaq dc7600 Small Form Factor=mp.inf
HP Compaq dc7100 SFF(DX878AV)=mp.inf
HP d530 USDT(DG009A)=mp.inf HP d530 CMT(PB600A)=mp.inf
HP Compaq nc6400 (RA263AT#ABA)=mp.inf

[SerialNo]
;Serial No=serial.inf

Notice you have a couple of different ways to specify the HAL. I do mine by model. You can get the model info by typing "c:\sysprep\mysysprep
/smbios" from the command prompt.

Note*: Make sure you have up.inf and mp.inf in your sysprep folder.

11. Now lets backup our base image in case we need to make changes in the future. I just create an image and call it by "Something Descriptive"base. Make sure to keep a changelog and always hold onto a couple older versions of the image.

12. Time to sysprep the image. Go ahead and clean out any Temp folders and those windows update unistall etc... Make sure to clear out your recycle bin.

Go to your "c:\sysprep" and run mysysprep.exe. Hit OK past the warning. You should see something like this...


Go ahead and check the Use Mini-Setup box and click Reseal. Once SYSPREP is done it will shut down your PC.

13. As soon as you turn on your PC back on boot it to a Pre-Environment or use a ghost boot disk. Create an image of your machine and you should be all set.

14. Push the SYSPREP'd image to a new machine. See if it works!

Note*: SYSPREP will automatically delete itself when it completes!

Errors and what they mean.

Laptops can be the trickiest to image. Make sure you are using the proper HAL and Mass stroage drivers.

I have found that when safe mode stops at
agp440.sys it is the HAL.
When it stops at mup.sys it is the mass storage drivers.

"Helpful Links"

Adding Drivers to your image.
http://www.microsoft.com/technet/technetmag/issues/2006/05/UtilitySpotlight/default.aspx


Thanks,

Admin Bromo

If you find this write up useful please feel free to link to it.


www.PepperDeath.com

Thursday, October 26, 2006

Sushi Night.

How To Make Sushi. A.K.A. Beginners Guide To Sushi.
Below is an e-mail I typed up for family and friends regarding sushi night. I kept everything pretty simple, nothing exotic. My wife has a fear of raw things etc...

Indeed 9/10/2006 was the day I decided to go balls to the wall against
Sushi. In a word, "success". Let me recap my plan so you too can be successful... and make like 20 rolls.

The Shopping List

  • Mirin
  • Rice Wine Vinegar
  • Sushi Rice (Short Grain). Don't skimp, get the good stuff.
  • noir (Roasted Seaweed). Again don't skimp.
  • Sriracho Hot Sauce (It's the red bottle with the Rooster on it.) You may have to go to an Asian Grocer for this. I have seen it at walmart too.
  • Crabstick (In Japan it is know as a fish stick or fish cake) You can get the actual Japanese ones at the Asian Grocer.
  • Avocado (make sure the bloody thing is ripe. The outside should be dark and it should be a little soft. The ones they use for Sushi are the little ugly dark ones.)
  • Cucumber
  • Kikomon Soy Sauce (I like the low sodium version)
  • BlueBell or Helmans Mayo
  • Sesame Seeds (Roasted or plain)
  • Bamboo Mat (Crucial to roll awesome rolls).
  • "A Very Sharp Knife" (Any knife will do, sharpen the heck out of it)

Optional

  • Smoked Salmon (Don't let the look of it deceive you. This stuff is cooked and awesome. It tastes like bacon.)
  • Shrimp (I used this for Tempura)
  • Masago Smelt Roe (Fish Eggs, that Orange stuff).
  • Kewpie Mayo (It's like regular Mayo, just a little less greasy. Feel free to use Helmans in it's place.) I paid like $4 for this stuff.
  • Panco (Japanese Breadcrumb) I used this for the shrimp tempura.

As far as shopping goes, you should be able to find the majority of the stuff you need at publix. Most of this is in ethnic food section. Only a couple of items you might have to go to an Asain Grocer for (The Sriracho Hot Sauce and the Masago Smelt Roe, that's about it). BTW, don't be afraid of the Asian Grocer they are usually very helpful!

Now I set out to make a couple different types of rolls; The Philly (Crab, Cream cheese, Cucumber, Sesame Seeds, and maybe some Avocado), The Rock-and-Roll (Shrimp Tempura, Crab, Smoked Salmon, Cream Cheese, Cumber, Avocado, and Sesame Seeds) Then mix and match the rolls.... I topped the Rolls with a Kabayaki Sauce, and had some Dynamite Sauce for dipping (The recipes are below.)... They turned out awesome, even my son ate some.

Sauce Recipes.

Kabayaki Sauce

  • 1/2 cup soy sauce
  • 1/2 cup mirin (sweet rice wine)
  • 1/4 cup sugar
  • *mix them together. That's it.

Dynamite Sauce
  • 1/2 cup mayonnaise
  • 2 tablespoons sriracha hot sauce
  • 1/2 - 1 teaspoon masago smelt roe (optional)
  • *mixxxxx em' up

Sushi Rice
This is the most important Step. Set aside a good 30+ minutes to spend on this. If your rice sucks, the sushi sucks. I have tried a bunch of different recipes and this one is by far the best. Do exactly what it says, do not skip any of the steps. Remember you add the Mirin and rice vinegar after you cook the rice (Trust me I have messed up plenty of sushi rice). Don't worry about the Kelp though.

Here is the original Link
http://www.recipezaar.com/119373

  • 2 cups sushi rice
  • 2 cups water
  • 4 tablespoons rice vinegar
  • 3 tablespoons sugar
  • 2 teaspoons salt
  • 2 tablespoons mirin
  • kelp, leaf (optional)


  1. Ignore the directions on the bag that the rice came from and rinse the rice only 3-5 times. The water does NOT have to run clear.
  2. Place rice to drain in a strainer.
  3. Drain for one hourin the winter, 30 min in the summer. (Sounds strange, but is true).
  4. While rice is draining, combine vinegar,sugar, salt and mirin together in a separate bowl and mix well.
  5. If using a kelp leaf,it should be about 2 in long
  6. Wipe it lightly, cut small slits to make it look like a comb and add it to a pot along with the water.
  7. Add rice to the pot.
  8. Bring quickly to a boil and then reduce to a simmer (I set my burner in between low and medium).
  9. Cover the pot and DON'T touch it until the end, NO PEEKING.
  10. Cook for 15 minutes before removing the pot from the heat but keep the lid CLOSED.
  11. Let rice rest for 10 min and then remove the cover.
  12. Place in a glass dish to cool and lightly fan the rice while adding the vinegar mixture.
  13. Mix rice gently, careful not to break it.
  14. Sushi rice is best used at body temperature.


For Shrimp Tempura just google it... There are a few sites that tell you how the carve up the shrimp and make the batter. I used Flour, An Egg, Seasame Oil, and water. Then you roll it in the Pango and fry it. Just use regular vegetable oil to fry. Mine were kinda bland though :(. they need some salt or something.


Now lets make the rolls. Rather than me typing up a big thingy on it lets follow some links.
Here are some good ones...

http://www.bento.com/trt-caliroll.html
http://www.sushilinks.com/sushi-recipes/philadelphia-roll.html

Google... Rinse, Repeat.

And so there you go. I figured I would share this with you. Hopefully it will bring you much joy :).

Love,

Admin Bromo

Monday, October 23, 2006

Getting into the swing of things...

As I work to establish a library of "best quotes ever" .... I give you this tidbit.

(Watch for bad formatting and grammar)

"My wireless internet has no dial tone." - anonymous C.E.O.

"The windows software key fried my motherboard" - an actual lvl1 tech.

Love,

Admin Bromo

Thursday, October 19, 2006

First Post!

Avast! Here be me first post on blogger. I hope to post all kinds of useful admin stuff here. This will in turn lead to world peace... etc.. etc...

Love,


Admin Bromo