extract cab file and execute the exe file(inside the cab file) automatically - extract

I have a cab file(w/ an executable file inside) embedded on my webpage. When the user access the page the cab file will be automatically extracted and the executable file inside should be executed as well. Is this possible? My hunch is that this will be configured in my inf file but I don't know how. I would appreciate your help in this.

You need to use the hook&run values, like in this sample
[version]
signature="$CHICAGO$"
AdvancedINF=2.0
[Add.Code]
time.ocx=time.ocx
msvcrt.dll=msvcrt.dll
mfc42.dll=mfc42.dll
olepro32.dll=olepro32.dll
[time.ocx]
file-win32-x86=thiscab
clsid={DCF0768D-BA7A-101A-B57A-0000C0C3ED5F}
FileVersion=1,0,0,0
RegisterServer=yes
[msvcrt.dll]
FileVersion=4,20,0,6164
hook=mfc42installer
[mfc42.dll]
FileVersion=4,2,0,6256
hook=mfc42installer
[olepro32.dll]
FileVersion=4,2,0,6068
hook=mfc42installer
[mfc42installer]
file-win32-x86=http://activex.microsoft.com/controls/vc/mfc42.cab
run=%EXTRACT_DIR%\mfc42.exe

Related

How to run JM reference software using visual studio 2010

I have downloaded the H.264 source code and I can view it in Visual studio 2010. I don't know how to run the JM Reference software. How can I do that, and how to view the output?
First of all right click on the project in VS and rebuild solution.
After that from command prompt go to bin folder of JM reference software.
Which is in JM->bin.
Now write lencod.exe in command prompt.
This will run your encoder for default video file selected in encoder configurations. And same goes for decoder that is ldecod.exe.
For other encoding/decoding parameters read manual.
These slides will also help you to get started.
Firstly, I recommend you to download the latest JM reference software for H.264/AVC form this link. After downloading just click on jm_vc11.sln file (solution file) and it will open in Microsoft Visual Studio (MVS) as this:
Solution Explorer Image in MVS
Then from toolbar menu, click on Build>Batch Build and you will see something like this:
Batch Build in MVS
Then click on Rebuild button and it will compile and build all of the projects of this solution in your current folder. After seconds or so, you can go through a folder called "bin" in the current folder. In this folder you see lots of config files which are in .cfg format. Please open encoder.cfg file and you can see all the encoder configuration for you H.264 codec and at first lines of it there is InputFile name, FramesToBeEncoded, FrameRates and the deafult values is as this picture. Just please make sure the file "foreman_part_qcif.yuv" existed in the bin folder. Then just open command prompt (type cmd in windows search bar) and go to the current directory>bin folder where you can see lencod.exe file. Type this in your command line: "lencod.exe -d encoder.cfg" and it will encode your InputFile and generate test_ref.yuv as a reconstruction file that you can see the result of your encoding process. Also you can see your .yuv files using third-party apps like "yuvplayer". For decoding, Please open bin>decoder.cfg and check that the inpuFile is "test.264" and the output is "test_dec.yuv". Then in command prompt type: "ldecod.exe -d decoder.cfg" and the decoded output file will be generated as "test_dec.yuv" which you can play it in yuvplayer, for example.
For more details about the parameters of encoders and decoders please check the documentation file in your currnet directory>doc folder.

Selenium ide to locate a file and store its path info from any computer

currently in my test scripts for automated file upload to browser, the paths are already defined in the value column
command type
target //input[#type='file']
value /Users/.../.../.../filename.extension
in such cases, this script is unable to run on other computers because the path would be different.
my question will be is
is there a way to locate the file in a general folder (for example file is downloaded and in the "download" folder), by using selenium ide can we get the path of the file (/Users/.../downloads/filename.extension)
store the path of the file with its extension into a notepad which i will be using it for multiple test of file uploads later on.
right now if my colleague needs to run the script from his computer, he have to manually change the value to his path.
You could use a suite file that contains a "setup" file to only change the file name in 1 place and the variable is shared across tests in the suite. You could also select an agreed up on place to store the files: c:\test_info\image.jpg.
Or you can make the file available by URL & not local, Unfortunately javascript prevents that for security: How to get the current file path in javascript
Unfortunately I can't think of any other good way unless you all have the same path in a home directory and could do something like ~/test_dir/photo.jpg

IrfanView generate HTML file from Thumbnails in cmd

I try generate from IrfanView cmd interface HTML page from directory with Thumbnails, but I can't find any parameter or options, how I can do it.
I can generate Thumbnails via:
"C:\Program Files (x86)\IrfanView\i_view32.exe" "C:\Test\FullScreens\*.jpg" /resize=(100,100) /aspectratio /resample /convert="C:\Test\*.png
I can't find this in cmd:
It is possible to realize this?
Thank you, Regards,
  Peter
The text file i_options.txt in program files folder of IrfanView contains all options which can be used on command line. There is no option to create an HTML file. This must be done via GUI using the captured dialog.
But after creating the thumbnails for the images, it would be of course possible to create with a batch file also the HTML file using the commands echo, for, if and set with output created by several echo command lines redirected to the HTML file to create. Executing in a command prompt window help echo, help for, ... displays help on those internal commands of command interpreter cmd.
However, it would be a lot of work to create a batch file with all the parameters of the dialog. And it would make the batch file slower to really support all those parameters. A tailor-made batch file for creating the HTML file exactly like you want them would be much easier to code.
I suggest to try by yourself coding the batch file to create the HTML file. Create a new question with a link to this question, if you have somewhere a problem which you can't solve by yourself. Post in this question the batch code you have so far and the content of the HTML file created by IrfanView which should be instead created by the batch file.

turn folder into a zip file

I have a folder on my desktop and i want to convert it into a .zip file. It shouldnt ask me were to save it but just save it straight to my desktop or any folder i specified.
I tried ASZip, fZip etc. but i can't get it to work. There isn't any of them that seem to let me just add a folder and zip it.
I was only able to create a byteArray wit ASZip but when i saved it, it left me with a file that was not able to be opened.
Would it be possible to achieve what i want without the use of an external library?
Any help would be appreciated.
You can't actually zip a folder but you can zip all the contents inside the folder. You would have to use FileReferenceList to load in flash all the files inside the folder.
FileReferenceList allows you to have multiple selection in the browse window.
Then you would have to pass all these files to the zip managing library and get a ByteArray from it.
This byte array you would localy dump inside a "yourFileName.zip" by using FileReference.save().
The application cannot save the file to a predetermined location. The user has to pick the location using the "save to" prompt.

How to extract hhp file from a chm file

I have an A.chm file for my windows application which runs as expected.
When I decompile it using HTML workshop I get set of html files, .hhc file, .hhk file. When I compile another file B.chm from these extracted files without changing any of the files.((I want to add more html contents to this file but looks like I am losing some information after decompiling)) The output file I get is 72K where as the original file was 75K. B.chm's contents look all file when viewed in the chm viewer but the behavior is lost when when used with the application.
After reading around I found that if .hhp can be extracted from a .chm file then it can be re-constructed as it is without losing any mapping or aliases. Is that true?
How can I extract .hhp file from a .chm file?
Thanks,
Sam
No, Yes , and no.
The original hhp can't be guaranteed extracted
however since chm is an archive type, the project could have added all project files to the archive. I assume you already would have found them if that were the case.
If the decompile process does its administration, it can regenerate the .hhp to a certain degree.
Comments and #define names will probably be lost though, maybe more, but that should not result in problems when recompiling.
But of course it could be that the decompiler is limited. You could try some other (search for something from "keytools").
If not, then take "chmlib" and start drilling down into the format.