如何检测VBScript运行wscript.exe

 

[Setup]
AppName=WScriptVersion
AppVerName=WScriptVersion
DefaultDirName=WScriptVersion
DisableStartupPrompt=true
Uninstallable=false
[Code]
function InitializeSetup(): Boolean;
begin
  MsgBox( 'Version of WScript.exe is (' + GetWScriptVersion() + ')',
   mbInformation, MB_OK );
  Result := false;
end;
function GetWScriptVersion(): String;
var  sVersion, fname:  String;
begin
  sVersion := '';
  if UsingWinNT
    then fname := ChangeDirConst('{sys}\wscript.exe')
    else fname := ChangeDirConst('{win}\wscript.exe');
  GetVersionNumbersString( fname , sVersion );
  Result := sVersion;
end;

你可能感兴趣的:(职场,休闲)