Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21328

help: 7-zip commandline in vb6

$
0
0
I use 7-zip command line uses like this one

7z a -sfx "E:\project1\lastname, firstname middle.exe" "E:\project1\lastname, firstname middlename" -pMYPASSWORD

in vb6, I have

dim folder as string
folder="lastname, firstname middlename" '<--------- this is name of a folder

ShellAndWait (App.Path & "\7z.exe" & " -sfx " & App.Path & "\" & zipfoldername & ".exe" & " " & App.Path & "\" & zipfoldername & "\ -p" & doctorspwd), vbHide, True

I dont know what is wrong here but using the command line, it works just fine but using the vb code, the vb command does not work to exe.

lastname, firstname middlename is the the name of the folder which is to be compressed and the output should be lastname, firstname middlename.exe

It is said that you need to put quotation marks if the name of the item to be compressed has spaces.

I dont know how to put the quotation marks there in the code. I am confused how.

Viewing all articles
Browse latest Browse all 21328


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>