Set WshShell = CreateObject("WScript.Shell")
strDesktopPath = WshShell.SpecialFolders("Desktop")
urlname = ArgObj(1)
Set objShortcutUrl = WshShell.CreateShortcut(strDesktopPath & "\" & urlname & ".url")
objShortcutUrl.TargetPath = ArgObj(2)
objShortcutUrl.Save
WshShell = new ActiveXObject("WScript.Shell");
strDesktopPath = WshShell.SpecialFolders("Desktop");
urlname = ArgObj(0);
objShortcutUrl = WshShell.CreateShortcut(strDesktopPath + "\\" + urlname + ".url");
objShortcutUrl.TargetPath = ArgObj(1);
objShortcutUrl.Save();
Christina Crawford
-----Original Message-----
From:
Andy Johnstone [mailto:[EMAIL PROTECTED]
Sent: Thursday,
March 16, 2006 12:02 PM
To: Crawford, Christina
Subject: RE:
[NAnt-users] Put _vbscript_ batch file code within NAnt
From: Crawford, Christina [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 16, 2006 9:14 AM
To: [EMAIL PROTECTED]
Cc: nant-users@lists.sourceforge.net
Subject: RE: [NAnt-users] Put _vbscript_ batch file code within NAnt
strDesktop = WshShell.SpecialFolders("Desktop")
Set oMyShortcut = WshShell.CreateShortcut(strDesktop + "\Sample.lnk")
oMyShortcut.WindowStyle = 3 '&&Maximized 7=Minimized 4=Normal
oMyShortcut.IconLocation = "C:\myicon.ico"
OMyShortcut.TargetPath = "%windir%\notepad.exe"
oMyShortCut.Hotkey = "ALT+CTRL+F"
oMyShortCut.Save
Set WshShell = CreateObject("WScript.Shell")
strDesktopPath = WshShell.SpecialFolders("Desktop")
urlname = ArgObj(1)
Set objShortcutUrl = WshShell.CreateShortcut(strDesktopPath & "\" & urlname & ".url")
objShortcutUrl.TargetPath = ArgObj(2)
objShortcutUrl.Save
strDesktop = WshShell.SpecialFolders("Desktop")
oUrlLink = WshShell.CreateShortcut(strDesktop+"\Microsoft Web Site.URL")
oUrlLink.TargetPath = "http://www.microsoft.com"
oUrlLink.Save
Set WshShell = Wscript.CreateObject("Wscript.Shell")
Set oShellLink = WshShell.CreateShortcut("aaa.lnk")
oShellLink.TargetPath = "notepad.exe"
oShellLink.Arguments = "c:\windows\desktop\aaa.txt"
oShellLink.Save
'Set oShellLink = Nothing
-----Original Message-----
From:
Crawford, Christina
Sent: Wednesday, March 15, 2006 3:57
PM
To: 'Andy Johnstone'
Subject: RE: [NAnt-users] Put
_vbscript_ batch file code within NAnt
From: Andy Johnstone [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 15, 2006 3:35 PM
To: Crawford, Christina
Subject: RE: [NAnt-users] Put _vbscript_ batch file code within NAnt
From: Crawford, Christina [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 15, 2006 3:15 PM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Put _vbscript_ batch file code within NAnt
How would one go about including _vbscript_
batch file code and
Embedding it
within an Nant build file? Can Nant script task
Be used in some way? I would also like to pass
parameters into the
Embedded code and
receive parameters out of the embedded code.
I currently am working on just using the Nant exec
task to execute
The existing
_vbscript_. I have to figure out how to pass parameters into
The Nant exec task into the _vbscript_ batch
file and receive parameters
Back to
save to an Nant project name for use later in the Nant build file.