Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Everyone,

Why this is not working in DOS Command -> Extracting a self extracting exe with passwod
"D:\TIMELINE\28062013\Exe.exe" password

But this works fine
cd D:<br />
cd Timeline\28062013<br />
Exe.exe password


Please help, I will use this code in vb.net to automatically extract all files

Thanks in advance
Posted
Updated 5-Jul-13 0:24am
v2
Comments
[no name] 5-Jul-13 6:42am    
How would you suppose that we would know what you mean by "is not working"?
hansoctantan 5-Jul-13 6:47am    
thank you for your comment, OriginalGriff has the perfect answer

1 solution

Possibly, because of permissions on the folder you are starting off in.
When you change disk and directory directly, you set the current folder for the application to execute in - so any extracted files will go into that folder. If you don't, then you could well (read almost certainly are) leaving the current directory exactly where is - which is likely to be C:\ or an application folder. Neither of these are likely to have write permission and your extract will probably fail.
Without seeing the code you are executing, it's difficult to recommend a solution, but it may be that your exe.exe file has a parameter telling it which folder to extract to.
 
Share this answer
 
Comments
hansoctantan 5-Jul-13 6:44am    
thank you very much, i cant find the extracted files when I'm using the Command Prompt but in vb.net, you're right its in the application path

Thanks again
OriginalGriff 5-Jul-13 7:02am    
If you're using Process.Start, you can set the StartInfo.WorkingDirectory to set where it will output the data - into the app folder is a bad idea, partly because it clutters it up, and partly because you may not always be able to write to it - Windows is getting increasingly restrictive about who can write to folders below "Program Files"
There is the Temporary directory, or see here:
http://www.codeproject.com/Tips/370232/Where-should-I-store-my-data
for a selection of places if you want the files more permanent!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900