Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Batch Program to Open Specific Workflow in SharePoint

Posted on 2014-04-29
2
335 Views
Last Modified: 2014-09-15
I have the following code almost working 100%

@echo off
set /p RequestID=Request ID: 
Set /a RequestID2=RequestID + 1

start /d "C:\Program Files\Internet Explorer" IEXPLORE.EXE breview.jnj.com/_layouts/Workflow.aspx?ID=%RequestID2%&List={639B9AC2-79D3-47B1-A273-B8ED0700C09F}&Source=http%3A%%2F%%2Fbreview%2Ejnj%2Ecom%%2FHCC%5FRequest%%2FForms%%2FAllItems%2Easpx%%3FRootFolder%%3D%%252fHCC%%255fRequest%252fREQUEST%255f%RequestID%

Open in new window


It opens up a new browser window with the URL.. however it has %22 after http:// which is causing the page to not display. If I removed the %22 it works fine.

http://%22breview.jnj.com/_layouts/Workflow.aspx?ID=1569&List={639B9AC2-79D3-47B1-A273-B8ED0700C09F}&Source=httpA%2F%2FbreviewEjnjEcom%2FHCCFRequest%2FForms%2FAllItemsEaspx%3FRootFolder%3D%252fHCC%255fRequest52fREQUEST55f1568

The issue is if I remove the leading " i the code the URL gets truncated after "Workflow.aspx?ID=1569" where the & is.

Is there some way to break this string up so it all display the needed full URL without the quote?

thanks

Adam
0
Comment
Question by:aehrenwo
2 Comments
 
LVL 4

Accepted Solution

by:
pstrong earned 230 total points
ID: 40201711
did you try to put double quotes around the url, ie:

start /d "C:\Program Files\Internet Explorer" IEXPLORE.EXE "<your url>"

Open in new window


It worked on a windows 7 box for me.

If you need to escape % characters you should be able to use %%, or ^%.

Also, you shouldnt need to encode the query string, you should just be able to pass the actual parameter values without encoding, ie:

&Source=http://breview.jnj.com/Request/Forms/AllItems.aspx?RootFolder=Request&REQUEST=%RequestID%

Hope that helps.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is about my first experience with programming Arduino.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question