Solved

Batch Program to Open Specific Workflow in SharePoint

Posted on 2014-04-29
2
330 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

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

867 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now