Hi,
I am trying to create a custom action to run a command in windows command prompt in IS2008. I am not familiar with how to create custom actions in installshield . Are there any tutorials for creating a custom action and to add it in a basic msi project? The installshield help doesn't have an example. Pls hlp.
Thanks
Arul
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Custom action
Started by
arulprakash88
, Jul 20 2010 11:46
1 reply to this topic
Posted 21 July 2010 - 05:12
Here is you example!
on error resume Next
Dim wsShell
Dim fso
Dim winpath,netpath,toolpath
Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists("C:\avdir.txt") then
objFSO.DeleteFile "C:\avdir.txt",True
end if
set objFSO=nothing
'
Set wsShell = CreateObject("WScript.Shell")
set fso = CreateObject("Scripting.FileSystemObject")
winpath=wsShell.ExpandEnvironmentStrings("%windir%")
'netpath=fso.BuildPath(winPath,"Microsoft.NET\Framework\v2.0.50727")
'toolPath = fso.BuildPath(netpath,"aspnet_regiis.exe")
'wsShell.Run toolpath & " -ir",1,true
netpath=fso.BuildPath(winPath,"System32\inetsrv")
toolPath = fso.BuildPath(netpath,"appcmd.exe")
wsShell.run "%ComSpec% /c " & toolpath & " list vdirs >> " & "C:\avdir.txt",1,True
on error resume Next
Dim wsShell
Dim fso
Dim winpath,netpath,toolpath
Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists("C:\avdir.txt") then
objFSO.DeleteFile "C:\avdir.txt",True
end if
set objFSO=nothing
'
Set wsShell = CreateObject("WScript.Shell")
set fso = CreateObject("Scripting.FileSystemObject")
winpath=wsShell.ExpandEnvironmentStrings("%windir%")
'netpath=fso.BuildPath(winPath,"Microsoft.NET\Framework\v2.0.50727")
'toolPath = fso.BuildPath(netpath,"aspnet_regiis.exe")
'wsShell.Run toolpath & " -ir",1,true
netpath=fso.BuildPath(winPath,"System32\inetsrv")
toolPath = fso.BuildPath(netpath,"appcmd.exe")
wsShell.run "%ComSpec% /c " & toolpath & " list vdirs >> " & "C:\avdir.txt",1,True