Skip to content

How To Publish a Folder Present at a UNC Path

This page provides steps for publishing a folder present at a UNC Path

Steps To Be Followed

  1. Create a batch file including the command you want to execute.

    • Eg: Batch file to open //nas :-

      C:/Windows/explorer.exe //x.x.x.x

      cmd /k

      Note

      1. Enter your File server IP instead of x.x.x.x**

      2. cmd /k line will keep the cmd open after executing the .bat file.

  2. Create a VBscipt file with .vbs extension.

    • Use a VB Script to call the batch file. Copy the lines below to an editor and save the file with .VBS extension. Edit the .BAT file name and path accordingly.

      Set WshShell = CreateObject(\"WScript.Shell\" )

      WshShell.Run chr(34) & \"H:\folder.bat\" & Chr(34), 0

      Set WshShell = Nothing

      Note

      This script will call the .bat file but run the cmd as hidden.

  3. Step-by-Step to wrap a vbs into an .exe

    1. Click Start, click Run, enter iexpress, and click OK. This starts the IExpress Wizard.

    2. On the Welcome to IExpress 2.0 page, select Create new Self Extraction Directive file and click Next.

    3. On the Package purpose page, select Extract files and run an installation command and click Next.

    4. On the Package title page, type a titlefor your package and click Next.

    5. On the Confirmation prompt page, select No prompt and click Next.

    6. On the License agreement page, select Do not display a license and click Next.

    7. On the Packaged files page, click Add and select thevbs script from the directory in which it resides.

    8. When you finish adding files, click Next.

    9. On the Install Program to Launch page, in the Install Program box, type

      c:\windows\system32\cscript.exe "yourVBS.VBS"

      OR

      c:\windows\system32\wscript.exe "yourVBS.VBS"

      Leave the Post Install Command box BLANK.

    10. On the Show Window page, select Hidden and click Next.

    11. On the Finished message page, select No message and click Next.

    12. On the Package Name and Options page, enter the path and filename that you want for this distribution package. Check both boxes and click Yes to the warning under Options and click Next.

    13. On the Configure restart page, select No restart and click Next.

    14. On the Save Self Extraction Directive page, select Save Self Extraction Directive (SED) file, edit the path and name of the file, and click Next.

    15. On the Create package page, click Next. When the package has been created, click Finish to exit.

  4. The package will now be created with the name you specified and have an extension of .EXE e.g. "yourVBS.EXE".

  5. How to install Remote Desktop Services role on a Windows 2012 R2 server

    1. Open Server manager

    2. Add Roles and Features

    3. Select Remote Desktop Services Installation

    4. Quick Start > Session-based Desktop deployment > Select the Computer/Server

    5. Check the box (Restart server automatically if required)

    6. Click Deploy.

  6. Publish "yourVBS.EXE" using RDS role in the server.

    1. Under Server manager > Dashboard\

    2. Select Remote Desktop Services > QuickSessionCollection > REMOTEAPP PROGRAMS > Tasks > Publish RemoteApp Programs

    3. Under list of programs Click ADD > Browse the yourVBS.EXE > created > Click on Publish

  7. Similarly publish an RDP application using HySecure.

    1. In the Program Path and file name give the "yourVBS.EXE" path.