Problems with batch file
Posted: Sat Apr 08, 2023 7:21 pm
I have a problem with running a batch file
If I run batch fil from cmd it runs perfectly. If I run the same batch file in my program it doesn't run. the log have no errors but it doesn't work
2023-04-08 19:02:39 Info Paramstr #00 : "C:\Program Files (x86)\ObviousIdea\Light Image Resizer 6\Resize.exe"
2023-04-08 19:02:39 Info CPU: Intel(R) Xeon(R) Gold 6130 CPU @ 2.10GHz
2023-04-08 19:02:39 Info Memory: 64,00 GB
2023-04-08 19:02:39 Info Screen DPI : 96
2023-04-08 19:02:39 Info Screen resolution : 1280 x 800, 32 bit
2023-04-08 19:02:39 Info System default language : Italiano (Italia)
2023-04-08 19:02:39 Info User default language : Italiano (Italia)
2023-04-08 19:02:39 Info Version : 6.1.6.0
2023-04-08 19:02:39 Info ExeName : C:\Program Files (x86)\ObviousIdea\Light Image Resizer 6\Resize.exe
2023-04-08 19:02:39 Info OS : Windows 10 Server Datacenter (full installation) Datacenter (Version 1809, Build 17763)
2023-04-08 19:02:39 ---- ******************** Log session start 2023-04-08 19:02:39.719 PID 26444********************
the file has only one line
"C:\Program Files (x86)\ObviousIdea\Light Image Resizer 6\resize.exe" %1 /profile=APULIA /run
where the "%1" is the complete path of image
the log , when I run it successfully in cmd windows is
2023-04-08 18:52:22 ---- ******************** Log session stop 2023-04-08 18:52:22.722 PID 23784********************
2023-04-08 18:52:22 Info Space saved: 2,70 KB (-36,81%)
2023-04-08 18:52:22 Info 1 image processed in 00:00:01.
2023-04-08 18:52:22 Info [6] Resizing "E:\Arxivar_data\Doc\Archive_2023\04\08\18\259d0cffb36d4dd8a4760bd7c9cdc216.jpg" [JPG] from 307x192 to 181x113. Saved as "E:\Arxivar_data\Doc\Archive_2023\04\08\18\259d0cffb36d4dd8a4760bd7c9cdc216 (Copia).jpg"
2023-04-08 18:52:22 Info 1 files
2023-04-08 18:52:22 Info --- Processing ---
2023-04-08 18:52:22 Info Destination: <original>
2023-04-08 18:52:22 Info Action: Create copies
2023-04-08 18:52:22 Info [ ] Remove background
2023-04-08 18:52:22 Info [ ] JPEG compression optimization
2023-04-08 18:52:22 Info [ ] Optimize PNG files with OptiPNG
2023-04-08 18:52:22 Info [ ] Split into parts
2023-04-08 18:52:22 Info [ ] Send by email
2023-04-08 18:52:22 Info [ ] Customize Metadata
2023-04-08 18:52:22 Info [X] Copy ICC
2023-04-08 18:52:22 Info [X] Copy IPTC
2023-04-08 18:52:22 Info [X] Copy XMP
2023-04-08 18:52:22 Info [X] Copy EXIF
2023-04-08 18:52:22 Info On name conflict: Prompt
2023-04-08 18:52:22 Info [ ] Keep file date
2023-04-08 18:52:22 Info [ ] Adjust portrait
2023-04-08 18:52:22 Info [ ] Flip image
2023-04-08 18:52:22 Info [ ] Rotate image
2023-04-08 18:52:22 Info [ ] Round edges
2023-04-08 18:52:22 Info [ ] Contrast
2023-04-08 18:52:22 Info [ ] Brightness
2023-04-08 18:52:22 Info [ ] Auto enhance
2023-04-08 18:52:22 Info [ ] Add border
2023-04-08 18:52:22 Info [ ] Sepia
2023-04-08 18:52:22 Info [ ] Grayscale
2023-04-08 18:52:22 Info [ ] Invert colors
2023-04-08 18:52:22 Info [ ] Watermark
2023-04-08 18:52:22 Info Filename Mask: %F (Copia)
2023-04-08 18:52:22 Info [x] Resolution: 300
2023-04-08 18:52:22 Info [X] Keep Quality
2023-04-08 18:52:22 Info Quality: 90%
2023-04-08 18:52:22 Info Colors: Automatic
2023-04-08 18:52:22 Info Format: As Original
2023-04-08 18:52:22 Info Policy: Always
2023-04-08 18:52:22 Info Filtering: Cubic
2023-04-08 18:52:22 Info Mode: Fit
2023-04-08 18:52:22 Info Height: 0,96 (cm)
2023-04-08 18:52:22 Info Width: 2,80 (cm)
2023-04-08 18:52:22 Info Profile: APULIA
2023-04-08 18:52:22 Info [X] Multithread processing: Auto
2023-04-08 18:52:22 Info [X] Create backups of original files
2023-04-08 18:52:22 Info [ ] Show preview
2023-04-08 18:52:22 Info Available threads: 8
2023-04-08 18:52:20 Info Paramstr #03 : "/run"
2023-04-08 18:52:20 Info Paramstr #02 : "/profile=APULIA"
2023-04-08 18:52:20 Info Paramstr #01 : "E:\Arxivar_data\Doc\Archive_2023\04\08\18\259d0cffb36d4dd8a4760bd7c9cdc216.jpg"
2023-04-08 18:52:20 Info Paramstr #00 : "C:\Program Files (x86)\ObviousIdea\Light Image Resizer 6\Resize.exe"
2023-04-08 18:52:20 Info CPU: Intel(R) Xeon(R) Gold 6130 CPU @ 2.10GHz
2023-04-08 18:52:20 Info Memory: 64,00 GB
2023-04-08 18:52:20 Info Screen DPI : 96
2023-04-08 18:52:20 Info Screen resolution : 1280 x 800, 32 bit
2023-04-08 18:52:20 Info System default language : Italiano (Italia)
2023-04-08 18:52:20 Info User default language : Italiano (Italia)
2023-04-08 18:52:20 Info Version : 6.1.6.0
2023-04-08 18:52:20 Info ExeName : C:\Program Files (x86)\ObviousIdea\Light Image Resizer 6\Resize.exe
2023-04-08 18:52:20 Info OS : Windows 10 Server Datacenter (full installation) Datacenter (Version 1809, Build 17763)
2023-04-08 18:52:20 ---- ******************** Log session start 2023-04-08 18:52:20.690 PID 23784********************
Where I am wrong?
the version of resize is 6.1.6.0
If I run batch fil from cmd it runs perfectly. If I run the same batch file in my program it doesn't run. the log have no errors but it doesn't work
2023-04-08 19:02:39 Info Paramstr #00 : "C:\Program Files (x86)\ObviousIdea\Light Image Resizer 6\Resize.exe"
2023-04-08 19:02:39 Info CPU: Intel(R) Xeon(R) Gold 6130 CPU @ 2.10GHz
2023-04-08 19:02:39 Info Memory: 64,00 GB
2023-04-08 19:02:39 Info Screen DPI : 96
2023-04-08 19:02:39 Info Screen resolution : 1280 x 800, 32 bit
2023-04-08 19:02:39 Info System default language : Italiano (Italia)
2023-04-08 19:02:39 Info User default language : Italiano (Italia)
2023-04-08 19:02:39 Info Version : 6.1.6.0
2023-04-08 19:02:39 Info ExeName : C:\Program Files (x86)\ObviousIdea\Light Image Resizer 6\Resize.exe
2023-04-08 19:02:39 Info OS : Windows 10 Server Datacenter (full installation) Datacenter (Version 1809, Build 17763)
2023-04-08 19:02:39 ---- ******************** Log session start 2023-04-08 19:02:39.719 PID 26444********************
the file has only one line
"C:\Program Files (x86)\ObviousIdea\Light Image Resizer 6\resize.exe" %1 /profile=APULIA /run
where the "%1" is the complete path of image
the log , when I run it successfully in cmd windows is
2023-04-08 18:52:22 ---- ******************** Log session stop 2023-04-08 18:52:22.722 PID 23784********************
2023-04-08 18:52:22 Info Space saved: 2,70 KB (-36,81%)
2023-04-08 18:52:22 Info 1 image processed in 00:00:01.
2023-04-08 18:52:22 Info [6] Resizing "E:\Arxivar_data\Doc\Archive_2023\04\08\18\259d0cffb36d4dd8a4760bd7c9cdc216.jpg" [JPG] from 307x192 to 181x113. Saved as "E:\Arxivar_data\Doc\Archive_2023\04\08\18\259d0cffb36d4dd8a4760bd7c9cdc216 (Copia).jpg"
2023-04-08 18:52:22 Info 1 files
2023-04-08 18:52:22 Info --- Processing ---
2023-04-08 18:52:22 Info Destination: <original>
2023-04-08 18:52:22 Info Action: Create copies
2023-04-08 18:52:22 Info [ ] Remove background
2023-04-08 18:52:22 Info [ ] JPEG compression optimization
2023-04-08 18:52:22 Info [ ] Optimize PNG files with OptiPNG
2023-04-08 18:52:22 Info [ ] Split into parts
2023-04-08 18:52:22 Info [ ] Send by email
2023-04-08 18:52:22 Info [ ] Customize Metadata
2023-04-08 18:52:22 Info [X] Copy ICC
2023-04-08 18:52:22 Info [X] Copy IPTC
2023-04-08 18:52:22 Info [X] Copy XMP
2023-04-08 18:52:22 Info [X] Copy EXIF
2023-04-08 18:52:22 Info On name conflict: Prompt
2023-04-08 18:52:22 Info [ ] Keep file date
2023-04-08 18:52:22 Info [ ] Adjust portrait
2023-04-08 18:52:22 Info [ ] Flip image
2023-04-08 18:52:22 Info [ ] Rotate image
2023-04-08 18:52:22 Info [ ] Round edges
2023-04-08 18:52:22 Info [ ] Contrast
2023-04-08 18:52:22 Info [ ] Brightness
2023-04-08 18:52:22 Info [ ] Auto enhance
2023-04-08 18:52:22 Info [ ] Add border
2023-04-08 18:52:22 Info [ ] Sepia
2023-04-08 18:52:22 Info [ ] Grayscale
2023-04-08 18:52:22 Info [ ] Invert colors
2023-04-08 18:52:22 Info [ ] Watermark
2023-04-08 18:52:22 Info Filename Mask: %F (Copia)
2023-04-08 18:52:22 Info [x] Resolution: 300
2023-04-08 18:52:22 Info [X] Keep Quality
2023-04-08 18:52:22 Info Quality: 90%
2023-04-08 18:52:22 Info Colors: Automatic
2023-04-08 18:52:22 Info Format: As Original
2023-04-08 18:52:22 Info Policy: Always
2023-04-08 18:52:22 Info Filtering: Cubic
2023-04-08 18:52:22 Info Mode: Fit
2023-04-08 18:52:22 Info Height: 0,96 (cm)
2023-04-08 18:52:22 Info Width: 2,80 (cm)
2023-04-08 18:52:22 Info Profile: APULIA
2023-04-08 18:52:22 Info [X] Multithread processing: Auto
2023-04-08 18:52:22 Info [X] Create backups of original files
2023-04-08 18:52:22 Info [ ] Show preview
2023-04-08 18:52:22 Info Available threads: 8
2023-04-08 18:52:20 Info Paramstr #03 : "/run"
2023-04-08 18:52:20 Info Paramstr #02 : "/profile=APULIA"
2023-04-08 18:52:20 Info Paramstr #01 : "E:\Arxivar_data\Doc\Archive_2023\04\08\18\259d0cffb36d4dd8a4760bd7c9cdc216.jpg"
2023-04-08 18:52:20 Info Paramstr #00 : "C:\Program Files (x86)\ObviousIdea\Light Image Resizer 6\Resize.exe"
2023-04-08 18:52:20 Info CPU: Intel(R) Xeon(R) Gold 6130 CPU @ 2.10GHz
2023-04-08 18:52:20 Info Memory: 64,00 GB
2023-04-08 18:52:20 Info Screen DPI : 96
2023-04-08 18:52:20 Info Screen resolution : 1280 x 800, 32 bit
2023-04-08 18:52:20 Info System default language : Italiano (Italia)
2023-04-08 18:52:20 Info User default language : Italiano (Italia)
2023-04-08 18:52:20 Info Version : 6.1.6.0
2023-04-08 18:52:20 Info ExeName : C:\Program Files (x86)\ObviousIdea\Light Image Resizer 6\Resize.exe
2023-04-08 18:52:20 Info OS : Windows 10 Server Datacenter (full installation) Datacenter (Version 1809, Build 17763)
2023-04-08 18:52:20 ---- ******************** Log session start 2023-04-08 18:52:20.690 PID 23784********************
Where I am wrong?
the version of resize is 6.1.6.0