PDFCreator and Ghostscript for Windows - is it possible to monitor progress? - windows

I'm using PDFCreator Free, which uses Ghostscript (gswin32c.exe) behind the scenes to produce PDF files by printing to a virtual printer. I'm using it in batch mode, which generates the PDF, then launches a custom batch file.
Some large files take several minutes to complete, during which time there is no way to determine progress (my batch file doesn't launch until the process is done). I can see the gswin32c.exe file running in Task Manager, and in the %Temp%/PDFCreator directory, the Spool and Temp directories get some content.
Is there a way to determine Ghostscript's progress (or at least the number of pages already generated) so I can report this from somewhere? I can't see or change the command-line arguments sent to Ghostscript, since it's called from the proprietary PDFCreator software. Is there a file somewhere that contains some type of status or metrics on the running GS process?

Basically, no. It depends slightly on the exact command-line arguments (which you haven't given), but I imagine all the feedback is being suppressed.
Note that pdfwrite doesn't create any pages at all until its finished processing the input, and there's no easy way to determine how many pages are in the input PostScript program.

Related

Windows: Additional file attribute preventing downloaded program from running?

I have a compiled program which runs great after being compressed, copied to another computer using a USB key, extracted and ran.
However, if I upload the compressed file to Google Drive or Dropbox, download it and extract it, the program will not run. It gives me an error "program.exe has stopped working".
Using a tool called WinMerge, I compared the program that was extracted from a USB drive with the program that was extracted after being downloaded. Every file, both binary and text, was identical.
Next I used attrib -r -a -s -h on every program file in both folders, thinking perhaps one of the file attributes was incorrect. I still had the same problem; the copied program works, the downloaded one does not.
I also tried changing the name and location of the folders the program was in but it had no effect.
The only thing I can think of is some additional attribute that Windows gives files which were downloaded from the internet, to possibly trigger an additional UAC check which is interfering with the program. Does this exist?
This is on Windows 7.
Found the problem. Windows adds an Alternate Data Stream (ADS) to every file downloaded off the internet. For some reason, these streams were preventing the program from running. Stripping the ADS from each file allows it to run.
I used a Windows Sysinternals program called Streams to strip the ADS data.

Get windows Log

I received a windows application that is create a file on my windows. How can I find out where the file is?
I guess the program create a text file to save a code or something. I want that file. What can I do and how can I find it?
Sorry for bad English.
You can use Process Monitor to monitor any changes to file system or registry a program makes. Filter for the name of your programs executable and for file creation. Then run your program and analyze the log. Be prepared there might be a lot of entries.
Also keep in mind that "codes" are often not just stored in files. It might be in the registry and it might not be in the format you expect...

Is it possible to recover a running VBScript file, if the original file was already deleted?

I have one Vbscript which runs continuously on my system to monitor a web page on Internet Explorer.
I have permanently deleted this Vbscript file from its original location on system by mistake, However the script is still in RAM and is still running and monitoring the web page.
This script is very important to me but I have lost it :(
I want to know if there is any way by which I can recover the code of Vbscript file from system's RAM or any temporary file as the script is still running.
I am not allowed to use any file recovery software, so please don't suggest to install any third party data recovery software.
Try using 'ADPlus.vbs' script from WinDbg:
1. http://msdn.microsoft.com/en-us/windows/hardware/hh852365
2. http://support.microsoft.com/kb/286350
As the code was running, I followed the below process to recover the running code:
Go to Task Manager
Select the process and create dump
Open online dump analyser (www.osronline.com)
Upload dump file
Download the dump analysis
The dump analysis provided almost 95% of the correct code. Code within some loops were distorted or changed. As I was the owner of the code I was able to correct it.
Use HxD, it can view all ram content relative to any process at fly. It is commonly used to hack currently running games etc.
After locating your script, it might be needed to clear alphanumeric mess between your code, N++ and regex knowledge may be useful.

Appending data to executable to avoid triggering anti-virus software on Windows

My understanding is that the Windows PE executable file format has specific areas for data.
Currently, I am appending data to an executable, and it quickly declares it as being a virus in quite a few different anti-virus programs. It's at the point where any produced EXE triggers it.
Besides constantly sending false positive notes to vendors, is there a more appropriate method for appending data to an executable on Windows without being limited by data size?

bat file to launch exe and wait for string in standard output

Folks,
Is it possible to create a bat file that launches an executable and waits for a pre-determined string in the standard output. When that string is found, the batch file will exit (the exe can continue running). How could this be accomplished?
In short, no.
Note that originally MS-DOS was an operating system in which Windows ran. Now it is an application that simulates the earlier OS. The way to solve your would possibly involve using an application called from within MS-DOS, that will perform this kind of logic (i.e. IF(file_is_present_with_string)THEN {...}) in the MS-DOS command library.
Powershell is a powerful scripting language allowing you to perform many operations previously unavailable in MS-DOS, such as take the output from one MS-DOS command (e.g. ipconfig /all) and reformat it into a different layout, possibly using it as another command's input parameters (e.g. select a value from ipconfig and use it in another command). Although it supports MS-DOS command execution, it does so through the use of CMDLETs (pronouned command-let) which is a self-contained application designed to run inside Powershell. There are many other CMDLETs out there that might be able to help solve your problem.

Resources