title: set Shell = new (Shell.appliecaton)
body: <p>I've been using Shell to unzip a file. Suddenly it stopped working with the error:</p>
  
  <p>"Class does not support Automation or does not support expected interface"</p>
  
  <p>If I build it on a Win7 machine, it runs on the Win7 machine but not on Win10. 
  If I build it on a Win10 machine it runs on the Win10 machine but not on the Win7 machine. 
  An earlier version ran fine on both machines when built on the Win7 machine.</p>
  
  <p>I've carefully compared the .aip build files (Advanced Installer) and they are identical. I haven't touched the code in question for 3 or 4 months.  </p>
  
  <p>Here is the Code I'm using (you may recognize it):</p>
  
  <p>{ 
  Dim ShellClass  As shell32.Shell
  Dim FileSource  As shell32.Folder
  Dim Filedest    As shell32.Folder
  Dim Folderitems As shell32.Folderitems</p>
  
  <pre><code>If sFileSource = "" Or sFileDest = "" Then
      GoTo Zip_Activity_Err
  End If
  
  Select Case UCase$(Action)
      Case "ZIPFILE"
          If Right$(UCase$(sFileDest), 4) &lt;&gt; ".ZIP" Then
              sFileDest = sFileDest &amp; ".ZIP"
          End If
          If Not Create_Empty_Zip(sFileDest) Then
              GoTo Zip_Activity_Err
          End If
          Set ShellClass = New shell32.Shell
          Set Filedest = ShellClass.NameSpace(sFileDest)
          Call Filedest.CopyHere(sFileSource, 20)
  
      Case "ZIPFOLDER"
          If Right$(UCase$(sFileDest), 4) &lt;&gt; ".ZIP" Then
              sFileDest = sFileDest &amp; ".ZIP"
          End If
          If Not Create_Empty_Zip(sFileDest) Then
              GoTo Zip_Activity_Err
          End If                                   
          Set ShellClass = New shell32.Shell
          Set FileSource = ShellClass.NameSpace(sFileSource)
          Set Filedest = ShellClass.NameSpace(sFileDest)
          Set Folderitems = FileSource.Items
          Call Filedest.CopyHere(Folderitems, 20)
      Case "UNZIP"
          If Right$(UCase$(sFileSource), 4) &lt;&gt; ".ZIP" Then
              sFileSource = sFileSource &amp; ".ZIP"
          End If
  
          Set ShellClass = New shell32.Shell  &lt;--- Here's where it fails
  
          Set FileSource = ShellClass.NameSpace(sFileSource)     
          Set Filedest = ShellClass.NameSpace(sFileDest)     
          Set Folderitems = FileSource.Items     
          Filedest.CopyHere Folderitems, _
              NoUserInterfaceIfErr + _
              NoConfirmOfNewDir + _
              YesToAll + NoProgBox               
       Case Else
  End Sele
  </code></pre>
  
  <p>}</p>