How to run an EXE with paramaters? 
Author Message
 How to run an EXE with paramaters?

I have want to run the MSIEXEC command to uninstall an MSI package for users
that have the program installed, but I can't seem to figure out how to add
the command line through wsh..

I want to be able to to launch the following command, IF a certain file
exists on the user's hard drive:

c:\winnt\system32\msiexec /x /qn "\\server\share\Adobe Photoshop
5.5\phtoshp.msi"



Sun, 04 Jul 2004 03:44:35 GMT  
 How to run an EXE with paramaters?
    Just use the Run() or Exec() methods.

Set oShell = CreateObject( "WScript.Shell" )
Set oFileSystem = CreateObject( "Scripting.FileSystemObject" )
if ( oFileSystem.FileExists( "filename.ext" ) = True ) then
    sCommand = "c:\winnt\system32\msiexec /x /qn ""\\server\share\Adobe
Photoshop 5.5\phtoshp.msi"""
    oShell.Run sCommand, 1, True
end if

Hope this helps

Anthony

Quote:

> I have want to run the MSIEXEC command to uninstall an MSI package for users
> that have the program installed, but I can't seem to figure out how to add
> the command line through wsh..

> I want to be able to to launch the following command, IF a certain file
> exists on the user's hard drive:

> c:\winnt\system32\msiexec /x /qn "\\server\share\Adobe Photoshop
> 5.5\phtoshp.msi"



Sun, 04 Jul 2004 04:26:00 GMT  
 How to run an EXE with paramaters?
thanks


Quote:
>     Just use the Run() or Exec() methods.

> Set oShell = CreateObject( "WScript.Shell" )
> Set oFileSystem = CreateObject( "Scripting.FileSystemObject" )
> if ( oFileSystem.FileExists( "filename.ext" ) = True ) then
>     sCommand = "c:\winnt\system32\msiexec /x /qn ""\\server\share\Adobe
> Photoshop 5.5\phtoshp.msi"""
>     oShell.Run sCommand, 1, True
> end if

> Hope this helps

> Anthony


> > I have want to run the MSIEXEC command to uninstall an MSI package for
users
> > that have the program installed, but I can't seem to figure out how to
add
> > the command line through wsh..

> > I want to be able to to launch the following command, IF a certain file
> > exists on the user's hard drive:

> > c:\winnt\system32\msiexec /x /qn "\\server\share\Adobe Photoshop
> > 5.5\phtoshp.msi"



Sun, 04 Jul 2004 05:27:47 GMT  
 How to run an EXE with paramaters?

This posting is provided ?AS IS?, with no warranties, and confers no
rights.



Tue, 06 Jul 2004 14:51:56 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. How to run an app on the server and pass paramaters from the client - newbie

2. Running cscript.exe and wscript.exe from the floppy drive

3. Running NBTSTAT.EXE with Run

4. nt4 shell.run: unable to run .exe in netlogon

5. run exe from asp

6. run exe from asp

7. Running an EXE from a HTML page

8. How do I run notepad.exe on the server using vbscript

9. run exe file

10. Running EXE's

11. running regsvr32.exe

12. Run an EXE file

 

 
Powered by phpBB® Forum Software