CheckzenFiive
Technical User
Hello there :- )
I´ve got a problem:
I´ve written a script that pins applications to the taskbar.
It looks like this:
___________________________________________________________________
on error resume next
Set objShell = CreateObject("Shell.Application")
Set objFSO = CreateObject("Scripting.FileSystemObject")
set ArgObj = wscript.Arguments
dim PfadEXE
dim PinModus
dim Sprache
dim DebugMode
Debugmode = 1
PfadEXE = argobj(0)
PinModus = argobj(1)
Sprache = argobj(2)
if DebugMode = 1 then
msgbox "-" & PfadEXE & "- -" & PinModus & "- -" & Sprache & "-"
end if
strlPath = PfadEXE
strFolder = objFSO.GetParentFolderName(strlPath)
strFile = objFSO.GetFileName(strlPath)
Set objFolder = objShell.Namespace(strFolder)
set objFolderItem = objFolder.ParseName(strFile)
Set colVerbs = objFolderItem.Verbs
For each itemverb in objFolderItem.verbs
if Sprache = 1 Then
if PinModus = 1 Then
If Replace(itemverb.name, "&", "") = "An Taskleiste anheften" Then itemverb.DoIt
end if
if PinModus = 0 Then
If Replace(itemverb.name, "&", "") = "Von Taskleiste lösen" Then itemverb.DoIt
end if
End if
if Sprache = 0 then
if PinModus = 1 then
If Replace(itemverb.name, "&", "") = "Pin to taskbar" Then itemverb.DoIt
End if
if PinModus = 0 then
If Replace(itemverb.name, "&", "") = "Unpin this program from taskbar" Then itemverb.DoIt
End if
end if
next
___________________________________________________________________
So the script works like this:
Open cmd.exe -> Insert Script -> Insert applicationpath -> 1 / 0 for pin or unpin -> 1 / 0 for german / english.
Example: "C:\Users\Desktop\pin.vbs" "C:\Windows\Explorer.exe" 1 1
My problem is that I want to pin the applications with arguments/parameters like "explorer.exe -e".
Does anyone have an idea how I can realize this?
Thanks in advance,
CheckzenFiive
I´ve got a problem:
I´ve written a script that pins applications to the taskbar.
It looks like this:
___________________________________________________________________
on error resume next
Set objShell = CreateObject("Shell.Application")
Set objFSO = CreateObject("Scripting.FileSystemObject")
set ArgObj = wscript.Arguments
dim PfadEXE
dim PinModus
dim Sprache
dim DebugMode
Debugmode = 1
PfadEXE = argobj(0)
PinModus = argobj(1)
Sprache = argobj(2)
if DebugMode = 1 then
msgbox "-" & PfadEXE & "- -" & PinModus & "- -" & Sprache & "-"
end if
strlPath = PfadEXE
strFolder = objFSO.GetParentFolderName(strlPath)
strFile = objFSO.GetFileName(strlPath)
Set objFolder = objShell.Namespace(strFolder)
set objFolderItem = objFolder.ParseName(strFile)
Set colVerbs = objFolderItem.Verbs
For each itemverb in objFolderItem.verbs
if Sprache = 1 Then
if PinModus = 1 Then
If Replace(itemverb.name, "&", "") = "An Taskleiste anheften" Then itemverb.DoIt
end if
if PinModus = 0 Then
If Replace(itemverb.name, "&", "") = "Von Taskleiste lösen" Then itemverb.DoIt
end if
End if
if Sprache = 0 then
if PinModus = 1 then
If Replace(itemverb.name, "&", "") = "Pin to taskbar" Then itemverb.DoIt
End if
if PinModus = 0 then
If Replace(itemverb.name, "&", "") = "Unpin this program from taskbar" Then itemverb.DoIt
End if
end if
next
___________________________________________________________________
So the script works like this:
Open cmd.exe -> Insert Script -> Insert applicationpath -> 1 / 0 for pin or unpin -> 1 / 0 for german / english.
Example: "C:\Users\Desktop\pin.vbs" "C:\Windows\Explorer.exe" 1 1
My problem is that I want to pin the applications with arguments/parameters like "explorer.exe -e".
Does anyone have an idea how I can realize this?
Thanks in advance,
CheckzenFiive