MoshiachNow
IS-IT--Management
Hi,
I have the following 2 scripts as part of my HTML:
<script language=VBScript>
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set Shell = CreateObject("WScript.Shell")
DesktopPath = Shell.SpecialFolders("Desktop")
File2 = (DesktopPath & "\PE2800_20070110__sys.zip")
if objFSO.FileExists (File2) then
set objShell=CreateObject("Wscript.Shell")
objShell.Run("""%ProgramFiles%\WinZip\winzip32.exe"" -e -o
""%userprofile%\Desktop\PE2800_20070110__sys.zip"" c:\TEMP")
end if
</script>
<script language=VBScript>
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set Shell = CreateObject("WScript.Shell")
DesktopPath = Shell.SpecialFolders("Desktop")
File2 = (DesktopPath & "\PE2800_20070110__sys.zip")
ProgramFiles= Shell.SpecialFolders("ProgramFiles")
File1 = (ProgramFiles & "\WinZip\winzip32.exe")
if objFSO.FileExists (File1) then
Wscript.Quit
elseif objFSO.FileExists (File2) then
set objShell=CreateObject("Wscript.Shell")
objShell.Run("unzip -o ""%userprofile%\Desktop\PE2800_20070110__sys.zip"" -d c:\TEMP")
end if
</script>
I want the second script to skip running "unzip" if the winzip32.exe exists.
However it runs both - unzip and winzip32.
What s wrong >
Thanks
Long live king Moshiach !
I have the following 2 scripts as part of my HTML:
<script language=VBScript>
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set Shell = CreateObject("WScript.Shell")
DesktopPath = Shell.SpecialFolders("Desktop")
File2 = (DesktopPath & "\PE2800_20070110__sys.zip")
if objFSO.FileExists (File2) then
set objShell=CreateObject("Wscript.Shell")
objShell.Run("""%ProgramFiles%\WinZip\winzip32.exe"" -e -o
""%userprofile%\Desktop\PE2800_20070110__sys.zip"" c:\TEMP")
end if
</script>
<script language=VBScript>
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set Shell = CreateObject("WScript.Shell")
DesktopPath = Shell.SpecialFolders("Desktop")
File2 = (DesktopPath & "\PE2800_20070110__sys.zip")
ProgramFiles= Shell.SpecialFolders("ProgramFiles")
File1 = (ProgramFiles & "\WinZip\winzip32.exe")
if objFSO.FileExists (File1) then
Wscript.Quit
elseif objFSO.FileExists (File2) then
set objShell=CreateObject("Wscript.Shell")
objShell.Run("unzip -o ""%userprofile%\Desktop\PE2800_20070110__sys.zip"" -d c:\TEMP")
end if
</script>
I want the second script to skip running "unzip" if the winzip32.exe exists.
However it runs both - unzip and winzip32.
What s wrong >
Thanks
Long live king Moshiach !