Win7, Zip, permission
Hej,Nogen der kan fortælle mig hvad der går galt når jeg prøver at bruge Win7 interne zip program i windows 7
Nogle gange får jeg denne popup message: "File not found or no read permission"
Samme script virker i WinXP
***************************
Set WS = CreateObject("WScript.Shell")
Const zipPath = "D:\some.zip"
Set fso = CreateObject("Scripting.FileSystemObject")
Set shell32 = CreateObject("Shell.Application")
'Create blank zip file
With fso.OpenTextFile(zipPath, 2, True)
.Write "PK" & Chr(5) & Chr(6) & String(18, Chr(0))
End With
Set zip = shell32.NameSpace(zipPath)
'Put stuff into zip file
For i = 0 To WScript.Arguments.Count -1
zip.CopyHere shell32.NameSpace(WScript.Arguments(i))
Next
Do Until WScript.Arguments.Count <= zip.Items.Count
Wscript.Sleep(200)
Loop
MsgBox "Finish"
***************************