View Single Post
  #3  
Old 02-23-2011, 11:04 AM
bwilder bwilder is online now
Registered User
 
Join Date: 02-23-2011
Posts: 17
Thanks,
The full script is posted below and the failing method appears to be the CreateObject() method in the vbld_BuildStarting() method. Do you have any thoughts on what would causing this or how I would go about fixing it?

Code:
Sub CreateShortcut(target, sname)

	Set objWshShell = CreateObject("Wscript.Shell")
	
	' Read desktop path using WshSpecialFolders object
	strDesktopPath = objWshShell.SpecialFolders("Desktop")
	
	' Create a shortcut object on the desktop
	Set objShortcut = objWshShell.CreateShortcut(strDesktopPath & "\" & sname & ".lnk")
	
	' Set shortcut object properties and save it
	objShortcut.TargetPath = target
	objShortcut.Save
End Sub

Function IsVS2003Installed()
	IsVS2003Installed = Len(Application.ExpandMacros("%REG_READ(" & _
		"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\InstallDir, )%")) > 1
End Function

Function IsVS2005Installed()
	IsVS2005Installed = Len(Application.ExpandMacros("%REG_READ(" & _
		"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\InstallDir, )%")) > 1	
End Function

Function IsVS2008Installed()
	IsVS2008Installed = Len(Application.ExpandMacros("%REG_READ(" & _
		"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\InstallDir, )%")) > 1
End Function

Function IsVB6Installed()
	IsVB6Installed = Len(Application.ExpandMacros("%REG_READ(" & _
		"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual Basic\ProductDir, )%")) > 1
End Function

Function IsVC6Installed()
	IsVC6Installed = Len(Application.ExpandMacros("%REG_READ(" & _
		"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual C++\ProductDir, )%")) > 1
End Function

Function IsVSSInstalled()
	IsVSSInstalled = Len(Application.ExpandMacros("%REG_READ(" & _
		"HKCR\CLSID\{783CD4E4-9D54-11CF-B8EE-00608CC9A71F}\InprocServer32\, )%")) > 1
End Function

Sub vbld_BuildStarting()
dim a,b
a= 0
b= Builder.LaunchType
if a=b then
     CreateObject("wscript.shell").run "build\SenderResult.exe  submitstatus$b1",vbhide  
End If

End Sub




Sub vbld_BuildDone(status)
dim a,b
a=0
b= Builder.LaunchType
if a=b then 
    CreateObject("wscript.shell").run "build\SenderResult.exe buildresult$"&status&" submitstatus$"&"b2",vbhide
 End If

End Sub
Reply With Quote