Hello,
I hope someone can help me. I'm looking for a way to create a shortcut in the startup folder of current user in Windows 7. The shortcut is for virtual application in appv and has the following properties:
target:
C:\Program Files\Microsoft Application Virtualization Client\sfttray.exe (now the tricky part) /launch "Wellnomics WorkPace 4.0.0 4.0.0.8"
Working dir:
C:\PROGRA~1\MIEFD2~1 (or C:\Program Files\Microsoft Application Virtualization Client)
The shortcut must be created if certain file exists.
This is the vbs I created:
Set objShell=CreateObject("Wscript.Shell")
strUserprofile=objShell.ExpandEnvironmentStrings("%USERPROFILE%")
Workpace = strUserprofile & "\AppData\Local\Wellnomics\WorkPace"
Set objNetwork = wscript.CreateObject("wscript.network")
Set objFSO=CreateObject("Scripting.FilesystemObject")
If objFSO.FileExists(Workpace & "\" & objnetwork.UserName & ".usr") Then
Set WshShell = WScript.CreateObject("WScript.Shell" )
strStartup = WshShell.SpecialFolders("AllUsersStartmenu" )
set oShellLink = WshShell.CreateShortcut(strStartup & "\programs\startup\Wellnomics Workpace 4.0.0.lnk" )
oShellLink.TargetPath = "%programfiles%\Microsoft Application Virtualization Client\sfttray.exe" /launch "Wellnomics WorkPace 4.0.0 4.0.0.8"
oShellLink.IconLocation = "%programfiles%\Microsoft Application Virtualization Client\sfttray.exe"
oShellLink.Description = "Workpace"
oShellLink.WorkingDirectory = "C:\PROGRA~1\MICROS~3"
oShellLink.Save
End if
I've trouble getting the /launch "Wellnomics WorkPace 4.0.0 4.0.0.8" part right. Could someone please help me.
Grz,
Is
I hope someone can help me. I'm looking for a way to create a shortcut in the startup folder of current user in Windows 7. The shortcut is for virtual application in appv and has the following properties:
target:
C:\Program Files\Microsoft Application Virtualization Client\sfttray.exe (now the tricky part) /launch "Wellnomics WorkPace 4.0.0 4.0.0.8"
Working dir:
C:\PROGRA~1\MIEFD2~1 (or C:\Program Files\Microsoft Application Virtualization Client)
The shortcut must be created if certain file exists.
This is the vbs I created:
Set objShell=CreateObject("Wscript.Shell")
strUserprofile=objShell.ExpandEnvironmentStrings("%USERPROFILE%")
Workpace = strUserprofile & "\AppData\Local\Wellnomics\WorkPace"
Set objNetwork = wscript.CreateObject("wscript.network")
Set objFSO=CreateObject("Scripting.FilesystemObject")
If objFSO.FileExists(Workpace & "\" & objnetwork.UserName & ".usr") Then
Set WshShell = WScript.CreateObject("WScript.Shell" )
strStartup = WshShell.SpecialFolders("AllUsersStartmenu" )
set oShellLink = WshShell.CreateShortcut(strStartup & "\programs\startup\Wellnomics Workpace 4.0.0.lnk" )
oShellLink.TargetPath = "%programfiles%\Microsoft Application Virtualization Client\sfttray.exe" /launch "Wellnomics WorkPace 4.0.0 4.0.0.8"
oShellLink.IconLocation = "%programfiles%\Microsoft Application Virtualization Client\sfttray.exe"
oShellLink.Description = "Workpace"
oShellLink.WorkingDirectory = "C:\PROGRA~1\MICROS~3"
oShellLink.Save
End if
I've trouble getting the /launch "Wellnomics WorkPace 4.0.0 4.0.0.8" part right. Could someone please help me.
Grz,
Is