Phildw Posted September 13, 2013 Posted September 13, 2013 Hi guys, I have a script which I run as part of a .cmd that is run to launch a specific website in internet explorer when users logon. The problem I am having is that the url has a '&' in it which dos won't parse properly. I've been trawling the net but couldn't find a solution. I then tried to set the url i wanted as the homepage for that user via AD, but then couldn't find a way to make the script launch IE just to the homepage, it seems to need to have a url passed as an argument. Any help much appreciated. Phil
SovietRussia Posted September 13, 2013 Posted September 13, 2013 (edited) iexplore.exe http://URLhere Sorry, miss read it! - You need to add ^ before the & Edited September 13, 2013 by SovietRussia 1
LosOjos Posted September 13, 2013 Posted September 13, 2013 Hi @Phildw - have you tried escaping the ampersand with a caret? e.g: Original: http://www.google.co.uk/#q=edugeek&safe=active&sout=1 Escaped: http://www.google.co.uk/#q=edugeek^&safe=active^&sout=1 1
jamesreedersmith Posted September 13, 2013 Posted September 13, 2013 Could you not just put speech marks around the URL so it takes it as absolute?
Phildw Posted September 13, 2013 Author Posted September 13, 2013 iexplore.exe http://URLhere Sorry, miss read it! - You need to add ^ before the & Hi @Phildw - have you tried escaping the ampersand with a caret? e.g: Original: http://www.google.co.uk/#q=edugeek&safe=active&sout=1 Escaped: http://www.google.co.uk/#q=edugeek^&safe=active^&sout=1 No I haven't, I'll try that, thanks Could you not just put speech marks around the URL so it takes it as absolute? No, this breaks it unfortunately Cheers tho
Arthur Posted September 13, 2013 Posted September 13, 2013 You could copy-and-paste the long URL into the Google URL shortener (goo.gl). [b]Before[/b]: http://www.google.co.uk/#q=edugeek&safe=active&sout=1 [b]After[/b]: http://goo.gl/AaF3rl
Phildw Posted September 13, 2013 Author Posted September 13, 2013 That worked a treat, thanks guys. Btw, any ideas on how to make it start up without needing an address passed to it?
Garacesh Posted September 13, 2013 Posted September 13, 2013 Only way I could think of would be point it at a shortcut instead. But that's just adding a step where it isn't needed
amckinley Posted September 24, 2013 Posted September 24, 2013 I had to do something very similar to this at work, and I took it in a two step approach. First I used a batch file to add the link to everyone's favorites. echo [internetShortcut] >"%userprofile%\favorites\smartmoneycommunity.url" echo URL=http://www.smartmoneycommunity.org/ >>"%userprofile%\favorites\smartmoneycommunity.url" echo IconFile=e:\Backups\smartmoneycommunity.ico >>"%userprofile%\favorites\smartmoneycommunity.url" echo IconIndex=0 >>"%userprofile%\favorites\smartmoneycommunity.url" After that, I simply wrote a script to launch that link, and then added it to the startup folder, so it runs as soon as the computer is turned on. start %userprofile%\Favorites\smartmoneycommunity.url Hope this helps! Andrew
Liam Posted September 24, 2013 Posted September 24, 2013 You can just run it as part of the shortcut. No need for a cmd
amckinley Posted September 24, 2013 Posted September 24, 2013 very good point... in which case you could just modify the original code to save it in \startup instead of \Favorites, and save a step. We did it this way and saved it on a public network drive, then just sent everyone a link to the file and it auto installed it. Very simple.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now