All posts by Shahrad

Batch files for unattended windows installation to take care of additional work

The situation:

You have created an unattended installation of windows (using nLite + DriverPacks BASE or other programs), but usually this isn’t enough, you need more things to be done. So we write batch files to do the following silently & automatically:

  1. Changing the default input language by creating & importing a .reg file
  2. Installing fonts
  3. Installing programs like kmplayer, Office (2003), and Adobe Reader
  4. Installing .msi (Microsoft installer) packages
  5. Installing Microsoft hotfixes, patches & fixes (which you didn’t embed already for whatever reason) with .exe extension
  6. Installing a troublesome VB6 (visual basic 6) program
  7. Placing a shortcut on all users’ desktop
  8. Getting the user input to use later (the only step which requires user interaction, obviously!)
  9. Changing the computer name to the name we got by user input in the previous step
  10. Inserting commands into batch files from another batch file
  11. Changing windows user’s account password based on the user input in step 8
  12. Disabling the automatic login behavior of windows
  13. Inserting executable files into startup of windows
  14. Restarting
  15. Continue running batch files after a system restart
  16. Configuring files to run only the first time each user logs in
  17. Joining the computer to a domain

During these steps we do minor stuff as well, like: creating directories, copying and deleting files, and making delays.

These batch files are originally designed for Windows XP, but most of them are usable for newer versions of windows as well (some may need minor adjustments). I don’t describe how to make the unattended installation of windows itself, or how to work with DriverPacks BASE, you can find out about them by doing a search on the web. I mention the whole design of the batch files, the clues, important notes and the examples all in one place here. So, let’s get started.

Continue reading Batch files for unattended windows installation to take care of additional work

Control SSH capable device with iOS gesture/Windows shortcut

I wanted to toggle my DD-WRT router radio (=WiFi) on and off with a gesture from my iPad (long pressing home button for instance), and with a shortcut key from Windows. This is possible with SSH, and you are not limited to only toggling the router radio on and off, you can run many other commands on SSH capable devices/applications.

Continue reading Control SSH capable device with iOS gesture/Windows shortcut

Non-English characters not shown correctly in a MySQL database inside phpMyAdmin

The situation:

You have a MySQL database in a non-English language which works fine through web based apps. Because the encoding issues were not taken care of properly from the first place, when you want to view the records using phpMyAdmin (in xampp), you see garbage characters, like these:

مرکز آموزش توپخانه نزاجا

Continue reading Non-English characters not shown correctly in a MySQL database inside phpMyAdmin

Change fluid grid layout settings after the initial setup in Dreamweaver

Apparently there’s no official way to do this for now (CS6 , 12.0). Unofficially, you can follow these steps:

  1. Create a new fluid grid layout (from file > new) with your desired settings. This is temporary.
  2. Copy the .gridcontainer classes from the layouts (mobile, tablet & desktop) of this new fluid grid (only the ones that you changed) and paste them into the corresponding place in your main fluid grid. .gridcontainer classes are located in the css file containing your fluid grid settings.
  3. In the mentioned css file there’s a comment section at the top beginning with “Dreamweaver Fluid Grid Properties”. Replace new values there.
  4. Turn off visual aids for fluid grid & turn it on again for new changes to appear (this is done by using the button located in the Document toolbar with an eye & dotted square on it)
  5. This last step is a bit tricky. Probably your previous divs have lost their interactivity now & you cannot change their size or margin in the design view. This is because their widths need a bit of the adjustment. An easy solution is going to the temporary fluid grid you built in the first step (which now should look the same as your main one, in terms of fluid grid visual aids), creating a fluid div with your intended width & finally copying its width value from the css into your main fluid grid.
  6. Now you can delete the temporary fluid grid layout. It’s no longer needed.

Can’t access WordPress admin panel: “your ip is on a spam blacklist”

You want to access your WordPress admin panel, or you are using it already, but suddenly you get a message (in an overlay maybe) telling you “your ip is on a spam blacklist“.

This is caused by a plugin in your WordPress site, and the plugin could have been installed by you, your host, or a 3rd party WordPress installer. Using FTP or host’s file manager, rename the plugin directory in wp-content/plugins to solve the problem. Alternatively you can try to remove your IP from spam blacklist here. Ironically you may not be able to reach Stop Forum Spam website from your blocked IP!

Fixing startup problems, after installing windows xp on windows 7

There are enough instructions out there to fix this, I just want to point out some tricky issues.

  1. If you are using windows 7 DVD to boot & use “Startup Repair”, you may need to do it 3 times! (funny!)
  2. After successfully booting into 7, you may find that the partition containing xp is missing in My Computer. That’s because it has lost its drive letter. Go to Control Panel > Administrative Tools > Computer Management > Storage > Disk Management & assign a drive letter.
  3. Drive letters are not something absolute, but relative. Windows 7 probably sees the drive it’s installed into as C, while xp can see it as another letter.
  4. If your windows installations are on different hard drives, keep in mind that there’s an option for hard disk boot priority in BIOS.