-
Jan 5th, 2022, 06:51 AM
#1
Thread Starter
New Member
Run VBScript and Batch from hta page - issue with working directory
Hi
I have a hta page from where I'd like to run some scripts in the folder "files".
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.
-
Jan 5th, 2022, 10:57 AM
#2
Re: Run VBScript and Batch from hta page - issue with working directory
-
Jan 5th, 2022, 11:04 AM
#3
Thread Starter
New Member
Re: Run VBScript and Batch from hta page - issue with working directory
Thank you. I hard-coded the paths in the more complex scripts for now. That's working.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|