× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I'm using following VB script you also can copy the same to TEXT file and
save it as VBS change the necessary places as needed.
' --------------------------------------------------------------------------
' Script to create a shortcut for Western Union data upload
' By : Chamara Withanachchi
' date : 2009/03/16
' This use the WSHShell object to create a shortcut on the desktop.
' --------------------------------------------------------------------------

L_Welcome_MsgBox_Message_Text = "This script will create a shortcut to
Western Union Upload."
L_Welcome_MsgBox_Title_Text = "CHAMARA"
L_Message = "Please enter Branch Code"
Call Welcome()
Dim Result

' *
' * Shortcut related methods.
' *

Dim WSHShell
Dim objNetwork
Dim strDriveLetter, strRemotePath,user,pass
Set WSHShell = WScript.CreateObject("WScript.Shell")

Dim MyShortcut, MyDesktop, DesktopPath

' Read desktop path using WshSpecialFolders object
DesktopPath = WSHShell.SpecialFolders("Desktop")

strDriveLetter = "J:"
strRemotePath = "\\10.10.13.200\wupload"
user = "ABCD"
pass = "ABCD"

Set objNetwork = CreateObject("WScript.Network")

' Create a shortcut object on the desktop
Set MyShortcut = WSHShell.CreateShortcut(DesktopPath & "\Western Union " +
result + ".lnk")

' Map Network
On Error Resume Next
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath, FALSE, user, pass
If (Err.Number <> 0) Then
On Error GoTo 0
objNetwork.RemoveNetworkDrive strDriveLetter, True, True
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath, FALSE,
user, pass
End If
On Error GoTo 0

' Set shortcut object properties and save it
MyShortcut.TargetPath =
WSHShell.ExpandEnvironmentStrings("\\10.10.13.200\wupload\WU_" + result)

MyShortcut.WorkingDirectory =
WSHShell.ExpandEnvironmentStrings("\\10.10.13.200\wupload\WU_" + result)
MyShortcut.WindowStyle = 4

MyShortcut.Save

WScript.Echo "A shortcut to WU now exists on your Desktop."

' Welcome Subroutine to display main Screen
Sub Welcome()
Dim intDoIt

intDoIt = MsgBox(L_Welcome_MsgBox_Message_Text, _
vbOKCancel + vbInformation, _
L_Welcome_MsgBox_Title_Text )
If intDoIt = vbCancel Then
WScript.Quit
End If
Result = InputBox(L_Message,L_Welcome_MsgBox_Title_Text," ")
If result = "" Then
WScript.Quit
End If
End Sub



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.