Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a two version of my autorun.exe - for windows 7 - for oldier OS I look for a small free tool or program (not in .net or VB) that can be started silently with no window, checks for the OS version and starts an appropriated exe according to.

I wrote a batch, that works, but I can't start it silently from the autorun.inf.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

AutoIT can perform this sort of operation and create a small executable which doesn't require .NET or any other runtime pre-installed.

Switch @OSVersion

    Case "WIN_7"
        Run( "versionA.exe" )

    Case "WIN_VISTA", "WIN_XP"
        Run( "versionB.exe" )

    Case Else
        Run( "versionC.exe" )

EndSwitch
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.