Solved

Batch Program to Open Specific Workflow in SharePoint

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

706 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

22 Experts available now in Live!

Get 1:1 Help Now