Login | |
|
 |
RE: App Uninstall/Install - 4/23/2006 10:46:34 PM
|
|
 |
|
| |
mbouchard
Posts: 1922
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
Also, take a look at GetSpecialFolders in the WSH Document, and since the link seems to be dead and MS seems to have not listed the doc for downloading, I will need to check, here is the info on GetSpecialFolders quote:
GetSpecialFolder Method See Also GetAbsolutePathName Method | GetBaseName Method | GetDrive Method | GetDriveName Method | GetExtensionName Method | GetFile Method | GetFileName Method | GetFileVersion Method | GetFolder Method | GetParentFolderName Method | GetTempName Method Applies To: FileSystemObject Object Language * JScript * VBScript * Show All Returns the special folder object specified. object.GetSpecialFolder(folderspec) Arguments object Required. Always the name of a FileSystemObject. folderspec Required. The name of the special folder to be returned. Can be any of the constants shown in the Settings section. Settings The folderspec argument can have any of the following values: Constant Value Description WindowsFolder 0 The Windows folder contains files installed by the Windows operating system. SystemFolder 1 The System folder contains libraries, fonts, and device drivers. TemporaryFolder 2 The Temp folder is used to store temporary files. Its path is found in the TMP environment variable. The following example illustrates the use of the GetSpecialFolder method. [VBScript] Dim fso, tempfile Set fso = CreateObject("Scripting.FileSystemObject") Function CreateTempFile Dim tfolder, tname, tfile Const TemporaryFolder = 2 Set tfolder = fso.GetSpecialFolder(TemporaryFolder) tname = fso.GetTempName Set tfile = tfolder.CreateTextFile(tname) Set CreateTempFile = tfile End Function Set tempfile = CreateTempFile tempfile.WriteLine "Hello World" tempfile.Close
_____________________________
Mike For useful Scripting links see the Read Me First stickey! Always remember Search is your friend.
|
|
| |
|
|
|
 |
RE: App Uninstall/Install - 4/25/2006 3:00:53 AM
|
|
 |
|
| |
ebgreen
Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
|
Dim oWsh:Set oWsh = CreateObject("WScript.Shell") errReturn = objSoftware.Install(""" & oWsh.ExpandEnvironmentStrings("%windir%") & "\IsUninst.exe -a -y -f"C:\Program Files\Absoft WirelessOffice Pro\Uninst.isu""", , ALL_USERS)
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: App Uninstall/Install - 4/25/2006 3:28:02 AM
|
|
 |
|
| |
ebgreen
Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
|
Double quotes in command lines are always tricky. Run this and make sure the command looks right. Tweak the code if it does not. strCmd = """ & oWsh.ExpandEnvironmentStrings("%windir%") & "\IsUninst.exe -a -y -f""C:\Program Files\Absoft WirelessOffice Pro\Uninst.isu""" WScript.Echo strCmd Dim oWsh:Set oWsh = CreateObject("WScript.Shell") errReturn = objSoftware.Install(strCmd, , ALL_USERS)
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: App Uninstall/Install - 4/25/2006 3:49:06 AM
|
|
 |
|
| |
ebgreen
Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
|
Try: Dim oWsh:Set oWsh = CreateObject("WScript.Shell") strCmd = """" & oWsh.ExpandEnvironmentStrings("%windir%") & "\IsUninst.exe -a -y -f"" ""C:\Program Files\Absoft WirelessOffice Pro\Uninst.isu""" WScript.Echo strCmd errReturn = objSoftware.Install(strCmd, , ALL_USERS)
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
|
|