G+_Rud Dog Posted December 4, 2015 Share Posted December 4, 2015 Simple DOS batch file works in Windows 8 fails in Vista? Can manually start ccs.exe in Vista so program is good to go. CALL ccs.exe Link to comment Share on other sites More sharing options...
G+_John Mink Posted December 4, 2015 Share Posted December 4, 2015 Permissions issue? Maybe trying to call an exe is triggering UAC? That would be my first response, not being a Vista/Batch guru?. Maybe try running command prompt as admin if you haven't already... Link to comment Share on other sites More sharing options...
G+_Rud Dog Posted December 4, 2015 Author Share Posted December 4, 2015 Thanks John, permissions on Windows is a bear and left Windows long time ago. Not sure about UAC will have to review online material. Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted December 5, 2015 Share Posted December 5, 2015 UAC on Vista was more annoying than anywhere else. If you're running a batch file, the CALL keyword isn't necessary for .exe files. In what way is it failing in Vista? Link to comment Share on other sites More sharing options...
G+_Rud Dog Posted December 5, 2015 Author Share Posted December 5, 2015 Ben, running the batch file causes a DOS prompt window to open and rapidly close after which nothing happens as opposed to Win8 where it launches my python3 script. So simple yet frustrating. Does this mean just entering ccs.exe in my batch file will fix the problem for Vista? Gonna have to try that. Then will have to find a way to get the batch file to recognize the OS it is running on. Overly complicated( I know welcome to windows) BTW I have always wished they had embedded the environment Unix users have enjoyed for years, bash, sed, awk etc. Link to comment Share on other sites More sharing options...
G+_Rud Dog Posted December 5, 2015 Author Share Posted December 5, 2015 Ben, tried the command alone in the batch file and it ran the same route as with the CALL command. FYI: Also some had said there is a problem with DOS commands related to the registry so I went to the MS site and ran the FIX-ME program they recommended but still the same problem. Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted December 5, 2015 Share Posted December 5, 2015 Interesting that it's opening and closing without any other alerts. You said double clicking the exe runs fine on Vista, how about running it from command line? One way to troubleshoot is to run the bat file from command line as well. That will keep it open and if there's an error being thrown it will be visible instead of disappearing. Is the bat file doing anything else? If not, is there another reason the batch file is being used? Regardless, the same batch code should work on 8 and Vista unless you're doing something else in the batch that's not compatible in Vista. Link to comment Share on other sites More sharing options...
G+_Rud Dog Posted December 5, 2015 Author Share Posted December 5, 2015 Ben, as soon as my duplication of laptop drive completes, its running Vista, will run the batch file from command line and see if it displays an error. As for is the batch file doing something other then starting the python 3 script, yes it is. This in its self took some research hell you might have been part of it. You see if you run my script directly from windows cmd window it fails. So just before firing off my script the batch file runs chcp 65001 which makes the failure or traceback go away. That was the best solution after searching communities and knowledge bases I could find as a fix. Don't remember now if I tested the batch file without chcp 65001 as part of the test run. Will do so after the duplicator finishes created a dup drive on Vista machine. For testing purposed to get around the failure of the batch file I open dos cmd window as Admin then type in chcp 65001 manually followed by my pythonscript.py. This tells me the cmds word but not from batch file. But will test as mentioned above. Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted December 5, 2015 Share Posted December 5, 2015 Oh yes, I think I do remember that. Glad you've made it this far. Sounds like you're making progress! Link to comment Share on other sites More sharing options...
G+_Rud Dog Posted December 5, 2015 Author Share Posted December 5, 2015 Opened DOS prompt window launched batch file and it carried out the CHCP 65001 then returned the prompt no script execution. For grins ran the batch file a second time and it didn't run either of the two line batch file. The file only has two line: chcp 65001 CALL CCS.exe Tried it with : chcp 65001 CCS.exe Same thing tried it with CALL e:/dist_CCS/CCS.exe and nothing. Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted December 5, 2015 Share Posted December 5, 2015 That's frustrating! Not sure if this is the issue or not, but have you tried replacing the "e:/dist_CCS/CCS.exe" with "e:\dist_CCS\CCS.exe"? The backslash is standard for Windows command line. Since the "call" keyword isn't necessary, I'd leave that out. Probably doesn't matter, but I know it should work without it. Also in command line (outside of the batch script), try just running "e:\dist_CCS\CCS.exe" (quotes shouldn't be needed). I can't think of any reason it would run on its own (I presume by double clicking in Windows Explorer) but not from command prompt/batch file. Link to comment Share on other sites More sharing options...
G+_Rud Dog Posted December 5, 2015 Author Share Posted December 5, 2015 First test change the forward slashes with back slashes, no difference. Same test but with CALL removed, no difference. Also since the CCS.exe is in the same folder as the bat file decided to try with out path also tried dot CSS.exe to show CWD and then tried and finally tried .\CCS.exe and nothing. These tests were tried from both window gui and CLI. As for running the cmd with path; e:\dist_CCS\CSS.exe this works and also so does running CCS.exe from within the dist_CCS directory. That's how I knew the CCS.exe was not the culprit. Suspected the path as well but could not get it to fail it followed the path and launched the python script. Finally decided to see if MicroSoft has anything on this. Submitted a failed batch file waiting to hear back. Link to comment Share on other sites More sharing options...
G+_Patrick Cannady Posted December 5, 2015 Share Posted December 5, 2015 I generally see call used with calling other batch files, replace call with start /wait "c:\dist_ccs\ccs.exe" and see what you get. Link to comment Share on other sites More sharing options...
G+_Rud Dog Posted December 6, 2015 Author Share Posted December 6, 2015 Thanks Patrick Tried: START C:\dis_ccs\ccs.exe /WAIT Unless I understood the syntax wrong this also does not work. Link to comment Share on other sites More sharing options...
G+_Patrick Cannady Posted December 6, 2015 Share Posted December 6, 2015 the /wait is before the exe. start /wait exe to start Link to comment Share on other sites More sharing options...
G+_Rud Dog Posted December 6, 2015 Author Share Posted December 6, 2015 Thanks Patrick will try that and tried to follow the syntax supplied by the DOS help cmd but we all know how cryptic that can be again thank you. Link to comment Share on other sites More sharing options...
G+_Rud Dog Posted December 6, 2015 Author Share Posted December 6, 2015 START /WAIT C:\dis_ccs\ccs.exe Placed in Bat file did nothing tried typing in at the DOS prompt as admin also did nothing. Link to comment Share on other sites More sharing options...
Recommended Posts