Friday 29 April 2011

how to make a usb hdd disk bootable with windows system in it???


situation

Are you boring to burn dvds for setup? With usb flash disks the setup gets much faster!
problem

how to make a usb hdd disk bootable with windows system in it??? 
works witn windows7, windows server 2008 / r2
difficulty level

8/10
solution

We assume that you are using either Vista or Windows 7 to create a bootable USB.

1. Insert your USB (4GB+ preferable) stick to the system and backup all the data from the USB as we are going to format the USB to make it as bootable.

2. Open a CMD

3. When the Command Prompt opens, enter the following command:
DISKPART and hit enter.
LIST DISK and hit enter.
Once you enter the LIST DISK command, it will show the disk number of your USB drive.
4. In this step you need to enter all the below commands one by one and hit enter. As these commands are self explanatory, you can easily guess what these commands do.
SELECT DISK 1 (Replace DISK 1 with your disk number)
CLEAN
CREATE PARTITION PRIMARY
SELECT PARTITION 1
ACTIVE
FORMAT FS=NTFS (Format process may take few seconds)
ASSIGN
EXIT


Don’t close the command prompt as we need to execute one more command at the next step. Just minimize it.

5. Insert your Windows DVD in the optical drive and note down the drive letter of the optical drive and USB media. Here I use “D” as my optical (DVD) drive letter and “H” as my USB drive letter.

6. Go back to command prompt and execute the following commands:
D:CD BOOT and hit enter. Where “D” is your DVD drive letter.
CD BOOT and hit enter to see the below message.
BOOTSECT.EXE/NT60 H: (Where “H” is your USB drive letter)

7. Copy Windows DVD contents to USB by any way (i.e. total commander).

You are done with your bootable USB. You can now use this bootable USB as bootable DVD on any computer that comes with USB boot feature (most of the current motherboards support this feature).

Note that this bootable USB guide will not work if you are trying to make a bootable USB on XP computer.

Thursday 28 April 2011

flex, air, How to write a file where the application is located


problem

adobe flex4 AS3.0, filestraem (air)
How to write a file where the application is located | the mystery "fileWriteResource" hidden error | how to write files in applicationDirectory (where is not allowed) [tested in windows only]
---
> page by dennis
solution

How to write a file where the application is located
in the follow example, the variable "filename" is String and has as value the the file name without path, i.e.: "sample.txt"
the follow code doesn't work, produces an error "fileWriteResource" that is not even thrown!
    var newFile:File=File.applicationDirectory.resolvePath(filename);
use the follow code:
    var newFile:File=File(File.getRootDirectories()[0]).resolvePath(File.applicationDirectory.nativePath+File.separator+filename);  //I am not kidding... it is working

Wednesday 27 April 2011

VirtueMart Error: Failed to parse the XML Update File


problem

joomla and VirtueMart
error: Error: Failed to parse the XML Update File
solution

try1:
Go to administrator/cache folder and the you will file the .zip package file you tried to install. For some reason this file is not downloaded correctly, download it again and place it in this folder. The go to VirtualMark backend and "check for update". The process should go on.
try2:
Go to administrator/cache folder and clear the whole folder, leaving behind the index.html file. It will have the zip you tried to upload before and also some cached files. Just delete them all.

Thursday 21 April 2011

flex error message: If the program is already running, close it before attempting to run.


problem
adobe flex4 AS3.0 air
Launching an air application from Flex 4 IDE, it crashes because of a bug, but the widow of the application is not created so…
Trying to launch the application again you get the error
If the program is already running, close it before attempting to run.
You cannot close the application… how to kill this invisible application?
---
> dn
solution
kill the process adl.exe

how to get the command line arguments of the flex air application


problem
adobe flex4 AS3.0 air
how to get the command line arguments of the air application
---
> dn
solution
You have to listen to invoke event of the air application.
Then, this event gives an InvokeEvent object.
This object has the arguments array, in this arrays are the command line arguments stored... see the follow Listener as example:
   protected function Handler_InvoceEvent(event:InvokeEvent):void
   {
    lb_test.text= event.arguments[0]+' '+ event.arguments[1];
    loadConfigFile();
   }