vb.net - unable to cast COM object of type "system.__comObject" to interface type 'shell32.shell' -
i run project in win 7 , xp, there error message, in project use shell32.shell copy , extract automatic exe file, shell32.shell not work in windows 7 , xp? if can, please suggest sheell32.shell can run
dim sc new shell32.shell() dim pathexeonserver string = "\\server\updateprogram\" try if (not system.io.directory.exists(path.combine(application.startuppath() & "\rs_application"))) directory.createdirectory(path.combine(application.startuppath() & "\rs_application")) else 'do nothing end if me.cursor = cursors.waitcursor file.copy(path.combine(pathexeonserver, filename & ".zip"), path.combine(application.startuppath() & "\rs_application", filename & ".zip"), true) system.io.file.delete(application.startuppath() & "\rs_application\" & filename & ".exe") dim output shell32.folder = sc.namespace(application.startuppath() & "\rs_application") dim input shell32.folder = sc.namespace(application.startuppath() & "\rs_application\" & filename & ".zip") output.copyhere(input.items, 4) me.cursor = cursors.arrow catch ex exception msgbox(ex.message, msgboxstyle.critical) end try
Comments
Post a Comment