I've been using this website to learn about deploying and it's been great to me. I put together a list of VBScript commands that I use to move or delete shortcuts after I install programs. It works great with WIWW by adding the script after the silent install.



' This is needed for all file manipulation
Dim filesys
Set filesys = CreateObject("Scripting.FileSystemObject")

' This is needed for accessing special folders
Set WshShell = WScript.CreateObject("WScript.Shell")


----------------
Creating Folders
----------------

dim newfolder

If Not filesys.FolderExists(wshShell.SpecialFolders("AllUsersStartMenu")&"\Programs\Internet\") Then

Set newfolder = filesys.CreateFolder(wshShell.SpecialFolders("AllUsersStartMenu")&"\Programs\Internet\")

End If



----------------
Deleting Folders
----------------

If filesys.FolderExists(wshShell.SpecialFolders("AllUsersStartMenu")&"\Programs\Alcohol") Then

filesys.DeleteFolder(wshShell.SpecialFolders("AllUsersStartMenu")&"\Programs\Alcohol")

End If


--------------
Deleting Files
--------------

If filesys.FileExists("c:\somefile.txt") Then

filesys.DeleteFile("c:\somefile.txt")

End If


------------
Moving Files
------------

If filesys.FileExists("c:\sourcefolder\anyfile.html") Then

filesys.MoveFile("c:\sourcefolder\anyfile.html", "c:\destfolder\")

End If


--------------
Moving Folders
--------------

dim mfolder

If Not filesys.FolderExists(wshShell.SpecialFolders("AllUsersStartMenu")&"\Programs\Entertainment") Then

set mfolder = filesys.GetFolder(wshShell.SpecialFolders("AllUsersStartMenu")&"\Programs\Accessories\Entertainment")

mfolder.Move (wshShell.SpecialFolders("AllUsersStartMenu")&"\Programs\Entertainment")

End If



------------------


Special folders to be used as: wshShell.SpecialFolders("AllUsersStartMenu")

The & character is used to join strings

* AllUsersDesktop
* AllUsersStartMenu
* AllUsersPrograms
* AllUsersStartup
* Desktop
* Favorites
* Fonts
* MyDocuments
* NetHood
* PrintHood
* Programs
* Recent
* SendTo
* StartMenu
* Startup
* Templates

More special folders:
http://www.activexperts.com/activmonitor/windowsmanagement/scripts/desktop/specialfolders/



--------------------
Program files folder
--------------------


' Define object for the "Program Files" folder
Const PROGRAM_FILES = &H26&

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(PROGRAM_FILES)
Set objProgramFiles = objFolder.Self
' program files is referenced by: objProgramFiles.Path



---------------
Using with WIWW
---------------

After the silent install

wscript.exe scriptname.vbs //B

//B suppresses errors
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
I want to delete all the Adobe Reader shortcuts that are created.
In the Shortcut table in Orca, what do I change? Do I just delete each entry or do I edit ShowCmd?
Answered 06/22/2007 by: bbrian
Yellow Belt

Please log in to comment
0
Just delete the table.
Answered 06/22/2007 by: VBScab
Red Belt

Please log in to comment
0
condition the createshortcuts action with something that will never happen.

I use 1=2 this means that it will not be processed. the benefit to this method is that later you can enable them without having to repackage the app.
Answered 06/24/2007 by: jmcfadyen
Fifth Degree Black Belt

Please log in to comment
Answer this question or Comment on this question for clarity