PDA

View Full Version : vbscript....help....PLEASE



it8ez2b
14-05-2008, 08:11 AM
Ok I need help Guys! I need a shortcut script to change the url of a several shortcuts icons. I know nothing about scripting. Please help!

I want to replace all the shortcuts with a specific name (ex navi.lnk) in a subdirectory for all users folders.

ex.

C:\data\profiles\ johndoe \navi.lnk
C:\data\profiles\ petelong \navi.lnk
C:\data\profiles\ bobhope \navi.lnk


That is basically it! If you need more details to understand.....ok

I have two servers running the exact same programs. If the primary server goes down, I want to run the script and change over about 100 users icon shortcut.

Example:
All the users shortcut icons in the C:\data\profiles\ username folder
is pointing to 10.0.25.35. If 10.0.25.35 server goes down, I would like to run the script and change all the shortcuts in that directory to 10.0.25.45.

kahawai chaser
14-05-2008, 10:12 AM
I have tried this for vb script -


navi.lnk (C:\data\profiles\ johndoe \navi.lnk)

which translates to this: navi.lnk (C:\data\profiles\ johndoe \navi.lnk)

For normal html code it would be this:


<a href="url=C:\data\profiles\ johndoe \navi.lnk">navi.lnk</a>

Which outputs this: navi.lnk (C:\data\profiles\ johndoe \navi.lnk)

Is that what you mean?

it8ez2b
14-05-2008, 10:44 AM
No not at all. I need a script. Something like a bat file that can run and change several icon target paths in a folder

kahawai chaser
14-05-2008, 11:22 AM
I see - Here's a online vb script helper for a batch install (http://juice.altiris.com/tip/3924/calling-a-batch-file-through-vb-script)...

beama
14-05-2008, 01:37 PM
Ok I need help Guys! I need a shortcut script to change the url of a several shortcuts icons. I know nothing about scripting. Please help!

I want to replace all the shortcuts with a specific name (ex navi.lnk) in a subdirectory for all users folders.

ex.

C:\data\profiles\ johndoe \navi.lnk
C:\data\profiles\ petelong \navi.lnk
C:\data\profiles\ bobhope \navi.lnk


That is basically it! If you need more details to understand.....ok

I have two servers running the exact same programs. If the primary server goes down, I want to run the script and change over about 100 users icon shortcut.

Example:
All the users shortcut icons in the C:\data\profiles\ username folder
is pointing to 10.0.25.35. If 10.0.25.35 server goes down, I would like to run the script and change all the shortcuts in that directory to 10.0.25.45.

Might be able help a little (For xp)

c:\data\profile\%username%\name.lnk

username is a system varible holding the name of the logged in user

beama
14-05-2008, 01:54 PM
just had quick play
this for a batch file which the user needs to run


@echo off
rem F: is a network drive
rem /y will not prompt for file over write
copy F:\new.lnk "c:\data\profile\%username%\desktop" /y
cls