[ Foro de BASIC ]

Ayudarme en crear un programa en Bash o Powershell

13-Sep-2018 02:40
angel garcia
0 Respuestas

Hola a todos. Me llamo angel . Quisiera saber si me pueden ayudar con el siguiente asunto.
Deseo incluir en mi barra de tareas de windows 7 los iconos de excel y outlook mediante powershell,bash o vbs. Como ya saben, en default esta incluido "internet explorer y windows player" a este quisiera incluir las aplicaciones mencionadas. cada vez que el usuario se logea al sistema operativo el programa se ejecutaria automaticamente. El programa se ejecutaria desde el servidor AD.
Buscando por internet encontre el siguiente programa, en vbs, pero no se ejecuta con exito en windows 7. Agradeceria su opinion en como resolver este problema. Gracias

Const CSIDL_COMMON_PROGRAMS = &H17
Const CSIDL_PROGRAMS = &H2
Const CSIDL_STARTMENU = &HB
Const CSIDL_PROGRAM_FILES = &H26
Const CSIDL_PROGRAM_FILESX86 = &H2A
Const CSIDL_WINDOWS = &H24

Dim objShell
Dim objAllUsersProgramsFolder
Dim strAllUsersProgramsPath
Dim objUserProfileFolderFolder
Dim strUserProfileFolderPath
Dim ProgramFilesFolderPath
Dim ProgramFilesFolderPathx86
Dim WindowsFilesFolderPath
Dim objFolder
Dim objFolderItem
Dim colVerbs
Dim objVerb

Set objShell = CreateObject("Shell.Application")

Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS)
strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path
Set objUserProfileFolderFolder = objShell.NameSpace (CSIDL_STARTMENU)
strUserProfileFolderPath = objUserProfileFolderFolder.Self.Path
Set ProgramFilesFolderPath = objShell.NameSpace (CSIDL_PROGRAM_FILES)
ProgramFilesFolderPath = ProgramFilesFolderPath.Self.Path
Set ProgramFilesFolderPathx86 = objShell.NameSpace (CSIDL_PROGRAM_FILESX86)
ProgramFilesFolderPathx86 = ProgramFilesFolderPathx86.Self.Path
Set WindowsFilesFolderPath = objShell.NameSpace (CSIDL_WINDOWS)
WindowsFilesFolderPath = WindowsFilesFolderPath.Self.Path

'Taskbar


‘Internet Explorer
Set objFolder = objShell.Namespace (strUserProfileFolderPath & "\Programs")
Set objFolderItem = objFolder.ParseName("Internet Explorer.lnk")
If Not(objFolderItem Is Nothing) Then
Set colVerbs = objFolderItem.Verbs
For Each objVerb in colVerbs
If objVerb.name = "eleminar desde el taskbar(&K)" Then objVerb.DoIt
Next
End if

‘Windows Media Player
Set objFolder = objShell.Namespace (ProgramFilesFolderPath & "\Windows Media Player" )
Set objFolderItem = objFolder.ParseName("wmplayer.exe")
If Not(objFolderItem Is Nothing) Then
Set colVerbs = objFolderItem.Verbs
For Each objVerb in colVerbs
If objVerb.name = "adicionar al taskbar(&K)" Then objVerb.DoIt
Next
End if

‘CMD
Set objFolder = objShell.Namespace (strUserProfileFolderPath & "\Programs\System Tools")
Set objFolderItem = objFolder.ParseName("Command Prompt.lnk")
If Not(objFolderItem Is Nothing) Then
Set colVerbs = objFolderItem.Verbs
For Each objVerb in colVerbs
If objVerb.name = "adicionar al taskbar(&K)" Then objVerb.DoIt
Next
End if




(No se puede continuar esta discusión porque tiene más de dos meses de antigüedad. Si tienes dudas parecidas, abre un nuevo hilo.)