title: Why does WinVerifyTrust() failing only on machine which is not connected to internet?
body: <p>I wanted to check the trust of the one of the .exe file in our project for which I am using C#.</p>
  
  <p>I have referred - <a href="http://pinvoke.net/default.aspx/wintrust/WinVerifyTrust.html" rel="nofollow">http://pinvoke.net/default.aspx/wintrust/WinVerifyTrust.html</a></p>
  
  <p>Here is my code snippet.</p>
  
  <pre><code>WinTrustData wtd = new WinTrustData(filename);
  Guid guidAction = new Guid(WINTRUST_ACTION_GENERIC_VERIFY_V2);
  WinVerifyTrustResult result = WinVerifyTrust(INVALID_HANDLE_VALUE, guidAction, wtd);
  bool valid = (result == WinVerifyTrustResult.Success);
  </code></pre>
  
  <p>filename - is nothing but .exe file path.</p>
  
  <p>WinVerifyTrust() mentioned in above code returns "WinVerifyTrustResult.Success" only if machine is connected to internet at least once.</p>
  
  <p>However on fresh machine it returns "0x800b0100" i.e.- "Trust_e_nosignature".</p>
  
  <p>Is it expected behavior? If yes then how to resolve it?</p>
  
  <p>I searched for this specific behavior but did not found any satisfactory answer.</p>