Forum Discussion
Oferv
14 years agoSuper Contributor
Thanks for your time friend,
here is the function that works for vbs but doesn't work for c#Script:
Function Installation()
Dim path
Set objFSO = CreateObject("Scripting.FileSystemObject")
path = "C:\\xxx.exe"
'path = "\\Net\\xxx.exe"
If objFSO.FileExists(path) Then
log.Message("Execution File Exists")
Set WshShell = CreateObject("WScript.Shell")
WshShell.run Chr(34) & path & Chr(34)
set WshShell = nothing
log.Message("Execution File Lunched")
Else
log.Message("Execution File Doesn't Exists")
End If
set objFSO = nothing
End Function
i'm actually not at work right now but as i remember i ran this function on vbs and as i said the file launched and the installation started and then i created new project with c#Script as default language and pasted it and the function didn't worked propely.
can you tell me if i wrote it correct?and if not can you please assume that you have an installation file (*.exe) on your c:\ drive and write a propr function that will run the exe file and start the installation?
i'll try it tomorrow at work and let you know if it works.
thanks, i appreciate it.
here is the function that works for vbs but doesn't work for c#Script:
Function Installation()
Dim path
Set objFSO = CreateObject("Scripting.FileSystemObject")
path = "C:\\xxx.exe"
'path = "\\Net\\xxx.exe"
If objFSO.FileExists(path) Then
log.Message("Execution File Exists")
Set WshShell = CreateObject("WScript.Shell")
WshShell.run Chr(34) & path & Chr(34)
set WshShell = nothing
log.Message("Execution File Lunched")
Else
log.Message("Execution File Doesn't Exists")
End If
set objFSO = nothing
End Function
i'm actually not at work right now but as i remember i ran this function on vbs and as i said the file launched and the installation started and then i created new project with c#Script as default language and pasted it and the function didn't worked propely.
can you tell me if i wrote it correct?and if not can you please assume that you have an installation file (*.exe) on your c:\ drive and write a propr function that will run the exe file and start the installation?
i'll try it tomorrow at work and let you know if it works.
thanks, i appreciate it.
Related Content
- 10 years ago
- 6 years ago
- 2 years ago
Recent Discussions
- 2 days ago
- 7 days ago
- 11 days ago