Support Forums

how to bypass exe path to script

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.
User avatar
manyone
Posts: 4
Joined: Sun Mar 03, 2013 12:41 pm

how to bypass exe path to script

Postby manyone » Tue Dec 09, 2014 9:51 am

is it possible to bypass the path of the executable to the unpacked executed script ?
User avatar
SAPIEN Support Forums
Posts: 945
Joined: Wed Dec 03, 2014 2:26 pm

how to bypass exe path to script

Postby SAPIEN Support Forums » Tue Dec 09, 2014 9:51 am

This is an automated post. A real person will respond soon.

Thank you for posting, manyone.

Here are some hints to help you get an accurate and complete answer to your question.

Ask in the best forum:
If you asked in the wrong forum, just copy your question to the right forum.

Anticipate follow-up questions!

Did you remember to include the following?
    1. Product, version and build
    2. 32 or 64 bit product
    3. Operating system, e.g. Windows 7 64 bit.
    4. Attach a screenshot, if applicable
    5. Attach logs, crash reports, etc., in a ZIP file
If not, please take a moment to edit your original post or reply to this one.

*** Make sure you do not post any licensing information ***
User avatar
jvierra
Posts: 10044
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: how to bypass exe path to script

Postby jvierra » Tue Dec 09, 2014 10:36 am

manyone wrote:is it possible to bypass the path of the executable to the unpacked executed script ?


I cannot tell what you are asking from the question. What do you mean by "bypass"? "Bypass" what?
User avatar
manyone
Posts: 4
Joined: Sun Mar 03, 2013 12:41 pm

Re: how to bypass exe path to script

Postby manyone » Wed Dec 10, 2014 6:47 am

explanation:
i have packaged a hta script with PS
this executable is anywhere in the filesystem, let's say x:\any\where\script.exe

this exe is unpacked at execution time to c:\temp\12345.hta

but i need to know the path of the executable in the script, so the question again:
is it possible to give this information at execution time to the unpacked script (as argument/parameter or anything else) ?
User avatar
jvierra
Posts: 10044
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: how to bypass exe path to script

Postby jvierra » Wed Dec 10, 2014 7:42 am

The script name and locations are here: window.location

Verify by adding this to the load procedure

MsgBox window.location
User avatar
manyone
Posts: 4
Joined: Sun Mar 03, 2013 12:41 pm

Re: how to bypass exe path to script

Postby manyone » Wed Dec 10, 2014 10:04 am

that is not correct, the window.location hold the path of the unpacked script file and not the path of the packed executable.
User avatar
jvierra
Posts: 10044
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: how to bypass exe path to script

Postby jvierra » Wed Dec 10, 2014 10:18 am

I know. You cannot easily change that vehavior. YOu can run the exe like this and get the arguments and parse them:

MyHta.exe %cd%
User avatar
manyone
Posts: 4
Joined: Sun Mar 03, 2013 12:41 pm

Re: how to bypass exe path to script

Postby manyone » Wed Dec 10, 2014 12:00 pm

i know that but what, if i need to doubleclick the exe by mouse or with rightclick to elevate the exe as another user or administrator rights ? It does not work.
i thought, that in an older version a system argument exists, which can passed to the script as argument, but i dont remember.
perhaps i think about a feature of another script packager.
User avatar
jvierra
Posts: 10044
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: how to bypass exe path to script

Postby jvierra » Wed Dec 10, 2014 1:25 pm

I don't know of any option but then I don't know everything about this packager used with an HTA.

You can post in Customer Service to see if the Sapien people have any ideas on how to get what you need.

Return to “VBScript”

Who is online

Users browsing this forum: No registered users and 7 guests