Answered by:

Creating an application that is a shortcut to a vbscript

Question

Here is how I am trying to do this. I think if I could get the file path to work correctly in PARAMETERS tag it would work. But it seems to just append the file path in PARAMETERS to the FILENAME which is c:\Windows\system32\wscript.exe.

Answers

In order to put "..." into the parameter string, you could use its XML relevant &quot;

PARAMETERS = "&quot;C:\Program Files\Subfolder with spaces&quot;"

As an alternative, you could try to figure out the file and folder's short names.

Also note that you should specify the full path (including the virtual drive letter) to your script - as you can see in your error message, wscript thinks that the script is located in the Epic2012.tracce
subfolder underneath of system32.

As a best practice, use %SFT_MNT% as a bullet-proof replacement for your virtual drive letter. This variable is available _inside_ the virtual environment

Thanks Nicke. I did just try that but no luck. If I knew how to handle the space in "shared files" I would be fine. But the PARAMETERS tag does not accept wildcards that I can tell. Not sure about escape characters for that.

My coworker suggested using a batch file to call the vbscript so I may give that a try.

In order to put "..." into the parameter string, you could use its XML relevant &quot;

PARAMETERS = "&quot;C:\Program Files\Subfolder with spaces&quot;"

As an alternative, you could try to figure out the file and folder's short names.

Also note that you should specify the full path (including the virtual drive letter) to your script - as you can see in your error message, wscript thinks that the script is located in the Epic2012.tracce
subfolder underneath of system32.

As a best practice, use %SFT_MNT% as a bullet-proof replacement for your virtual drive letter. This variable is available _inside_ the virtual environment

Thank you so much Falko. Let me know if I should open a separate post (I am a noob on the forum) but I do have a followup issue.

When I try to create feature block 1. I get a "server execution failed" error on the following "call oReg" line. Should I be pointing the script to the virtual registry? Just confused at how to handle this. I can include the entire
vbscript if that would be helpful.

Microsoft is conducting an online survey to understand your opinion of the Technet Web site. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.