Omniferum Posted October 25, 2011 Report Share Posted October 25, 2011 This piece of code use to work fine ::Keep this if your file cannot be installed and/or downloaded automatically and needs to be processed after Ketarin finishes for /f "tokens=*" %a in ('wmic path win32_VideoController get Name ^| findstr "ATI"') do set displaydriver=%a if defined displaydriver exit 2 START CMD /C "ECHO {appname}: This applications installation will start after you hit any key, wait for Ketarin to finish & PAUSE & "{file}"" & But I had to change it to this because it kept processing the rest of the script regardless of the exit 2 ::Keep this if your file cannot be installed and/or downloaded automatically and needs to be processed after Ketarin finishes for /f "tokens=*" %a in ('wmic path win32_VideoController get Name ^| findstr "ATI"') do set displaydriver=%a if defined displaydriver exit 2 else (START CMD /C "ECHO {appname}: This applications installation will start after you hit any key, wait for Ketarin to finish & PAUSE & "{file}"" &) Is this intentional? I relied on exit 2 in a bunch of scripts as it just ended the script and 'exited' then and there. Link to comment Share on other sites More sharing options...
floele Posted October 26, 2011 Report Share Posted October 26, 2011 I guess not intentional, will need to check it. Link to comment Share on other sites More sharing options...
floele Posted November 7, 2011 Report Share Posted November 7, 2011 Hm, actually works fine for me. Can you still reproduce it? Or provide me with the Ketarin log output? Does the script behave differently depending on the OS you are Ketarin running on maybe? Link to comment Share on other sites More sharing options...
Omniferum Posted November 12, 2011 Author Report Share Posted November 12, 2011 12/11/2011 7:07:08 PM: Nvidia Driver (Win7 x64): Executing command: for /f "tokens=*" %a in ('wmic path win32_VideoController get Name ^| findstr "ATI"') do set displaydriver=%a 12/11/2011 7:07:08 PM: Nvidia Driver (Win7 x64): Executing command: if defined displaydriver exit 2 12/11/2011 7:07:08 PM: Nvidia Driver (Win7 x64): Executing command: START CMD /C "ECHO Nvidia Driver (Win7 x64): This applications installation will start after you hit any key, wait for Ketarin to finish & PAUSE & "Z:\Software\Automatically Updated\Driver\285.62-desktop-win7-winvista-64bit-english-whql.exe"" This is on Windows 7 Ultimate 64-bit. I'm not sure why the OS would matter as it worked pefectly fine before. It seems to be with the if defined concept of the batch file and doesn't actually check it. Link to comment Share on other sites More sharing options...
shawn Posted November 13, 2011 Report Share Posted November 13, 2011 Any chance you don't have command extensions enabled? "if defined" relies on windows shell command extensions to operate. Check with: echo %CMDEXTVERSION% Link to comment Share on other sites More sharing options...
Omniferum Posted November 13, 2011 Author Report Share Posted November 13, 2011 Well I just get the value '2' in return. Regardless this shouldn't matter as the code WORKED in previous versions perfectly fine Link to comment Share on other sites More sharing options...
floele Posted November 13, 2011 Report Share Posted November 13, 2011 I'm not sure why the OS would matter as it worked pefectly fine before. Can you also say what "before" is? I don't think that Ketarin has changed in this regard. And I still can't reproduce it, but it should not happen on any system. Link to comment Share on other sites More sharing options...
Omniferum Posted November 13, 2011 Author Report Share Posted November 13, 2011 I mean in one of the last versions. I mean it could be something to do with my computer but it would seem an odd thing to happen. If it STILL works for you guys i'll assume it is on my end. Link to comment Share on other sites More sharing options...
floele Posted November 13, 2011 Report Share Posted November 13, 2011 Can you then try again if any of the previous version actually works in this regard? Link to comment Share on other sites More sharing options...
shawn Posted November 13, 2011 Report Share Posted November 13, 2011 Well I just get the value '2' in return. That's the command extensions version in use. 2 is what it should be, so this isn't it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now