Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Set the Current Folder (CHDIR in VBScript)

Status
Not open for further replies.

jerjim

Programmer
Jan 4, 2001
85
PH
How do I set the current folder?

For example, in a folder there is a self-extracting Zip file. In VBScript, how do i go to that folder and run the self-extracting file so that it outputs its files to that folder.

What happens now is that the files are extracted to the folder in which I execute the vbs file.

Thanks in Advance

 
This is my code:

WshShell.Run "c:\H3\Org\hr.exe", , TRUE

Hr.exe is a self-extracting zip file.
The problem is instead of extracting the files to
c:\H3\Org\hr.exe they are extracted to the folder where the
script resides.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top