Daiko Games
Cmd File can´t run on Process.Start(Filename);
if I want to convert my file I would need to write that with cmd directly but it can also be done by making a cmd File which i did and by running the code via C#, as I am making a Converter out of it
44 replies
Cmd File can´t run on Process.Start(Filename);
This is just a example of how it looks Like, I made a FLASHRUNNER Folder and added ruffle into it. I didn´t specify my whole Project here - my Problem is that is is too big to show it here I would need Discord Nitro - but I don´t need it
44 replies
Cmd File can´t run on Process.Start(Filename);
string swfFile = Path.Combine(Foldername, Path.GetFileNameWithoutExtension(Filename) + ".swf");
string OriginalFlashPlayer64 = Path.Combine(AppDomain.CurrentDomain.BaseDirectory + @"FFDEC\FlashRunner\ORIGINALFLASHRUNNER\ruffle-nightly-2025_03_25-windows-x86_32", "ruffle.exe");
string NewFlashPlayerPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory + @"FFDEC\Converted" + Path.GetFileNameWithoutExtension(Filename) + ".exe");
File.Copy(OriginalFlashPlayer64, NewFlashPlayerPath, true);
string NewFileToDeleteAfterConversion = Path.Combine(AppDomain.CurrentDomain.BaseDirectory + @"\FFDEC\Converted" + Path.GetFileNameWithoutExtension(Filename) + ".swf");
File.Copy(swfFile, NewFileToDeleteAfterConversion, true);
string BatchFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory + @"FFDEC", "ConvertSWFTOEXE.cmd");
File.WriteAllText(BatchFile, "cd");
File.AppendAllText(BatchFile, "\nffdec -swf2exe wrapper "" + NewFlashPlayerPath + "" "" + NewFileToDeleteAfterConversion + """);
string CopiedFlashPlayerPath = Path.Combine(Foldername + Path.GetFileNameWithoutExtension(Filename) + ".exe");
Process.Start(BatchFile);
File.Copy(NewFlashPlayerPath, CopiedFlashPlayerPath, true);
44 replies