Solved

Batch Program to Open Specific Workflow in SharePoint

Posted on 2014-04-29
2
336 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
[X]
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
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
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…

762 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