0% found this document useful (0 votes)
19 views

Run VBScript and Batch From Hta Page - Issue With Working Directory-VBForums

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Run VBScript and Batch From Hta Page - Issue With Working Directory-VBForums

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1/4/25, 12:03 PM Run VBScript and Batch from hta page - issue with working directory-VBForums

User Name Password Log in Help Register

Remember Me?

Forum What's New? Advertiser Disclosure

New Posts FAQ Calendar Forum Actions Quick Links Advanced Search

VBForums Visual Basic ASP, VB Script Run VBScript and Batch from hta page - issue with working directory

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.

Results 1 to 3 of 3

Thread: Run VBScript and Batch from hta page - issue with working directory

Thread Tools Display

Jan 5th, 2022, 06:51 AM #1

Sprudel
Run VBScript and Batch from hta page - issue with working directory
Thread Starter
New Member Hi

Join Date: Jan 2022 I have a hta page from where I'd like to run some scripts in the folder "files".
Posts: 6 Click Here to Expand Forum
It is workind for simple scripts (see Button 1) but not for more complexe scripts (Button 2, 3, 4). It says
path not found. If I run the complexe scripts in their folder it's working. I guess the reason is because the
working directory is not defined. How can I do that?

Code:
<head><title>testpage</title></head>
<Script language="VBScript">Set Wss=CreateObject("WScript.Shell")</script>

<body><table><tr><td align="center">
<br><br>1. Signatur erstellen (Sprachen waehlen):<br>
<form name="Form1">
<input type="Button" name="Button1" value="Deutsch">
<input type="Button" name="Button2" value="Franzoesisch">
<input type="Button" name="Button3" value="Italienisch">
<input type="Button" name="Button4" value="Englisch">

<SCRIPT FOR="Button1" EVENT="onClick" LANGUAGE="VBScript">


Wss.Run("files\test.vbs")
</SCRIPT>
<SCRIPT FOR="Button2" EVENT="onClick" LANGUAGE="VBScript">
Wss.Run("files\AutoSignature_French.vbs")
</SCRIPT>
<SCRIPT FOR="Button3" EVENT="onClick" LANGUAGE="VBScript">
Wss.Run("files\AutoSignature_Italian.vbs")
</SCRIPT>
<SCRIPT FOR="Button4" EVENT="onClick" LANGUAGE="VBScript">
Wss.Run("files\AutoSignature_English.vbs")
</SCRIPT>
</form>
</td></tr></table></body>

Thank you.

Reply With Quote

Jan 5th, 2022, 10:57 AM #2

jdc2000
Re: Run VBScript and Batch from hta page - issue with working directory
PowerPoster
Possibly useful links to supply the path:

https://social.technet.microsoft.com...eto?forum=ITCG

Join Date: Oct 2001 https://devblogs.microsoft.com/scrip...hen-it-starts/


Location: Idaho Falls, Idaho
USA https://stackoverflow.com/questions/...e-value-to-hta
Posts: 2,451
Code:
Wss.Run("D:\MainDir\SubDir\files\AutoSignature_English.vbs")

Or, just hard-code them, at least to test.

https://www.vbforums.com/showthread.php?894760-Run-VBScript-and-Batch-from-hta-page-issue-with-working-directory 1/2
1/4/25, 12:03 PM Run VBScript and Batch from hta page - issue with working directory-VBForums
Reply With Quote

Jan 5th, 2022, 11:04 AM #3

Sprudel
Re: Run VBScript and Batch from hta page - issue with working directory
Thread Starter
New Member Thank you. I hard-coded the paths in the more complex scripts for now. That's working.

Join Date: Jan 2022


Posts: 6

Reply With Quote

Quick Navigation ASP, VB Script Top

« Previous Thread | Next Thread »

VBForums Visual Basic ASP, VB Script Run VBScript and Batch from hta page - issue with working directory

Posting Permissions

You may not post new threads BB code is On


You may not post replies Smilies are On
You may not post attachments [IMG] code is On
You may not edit your posts [VIDEO] code is On
HTML code is Off
Forum Rules

Contact Us VB Forums Top

Terms and Conditions | About Us | Privacy Notice | Contact Us | Advertise | California - Do Not Sell My Info
Copyright 2025 TechnologyAdvice. All Rights Reserved.

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how
and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in
the marketplace.
All times are GMT -5. The time now is 11:57 AM.

https://www.vbforums.com/showthread.php?894760-Run-VBScript-and-Batch-from-hta-page-issue-with-working-directory 2/2

You might also like