- Posts: 68
- Thank you received: 0
Using Scripts to Map Shortcuts
16 years 6 months ago #26213
by asab
Using Scripts to Map Shortcuts was created by asab
Hi there
Hope all is well.
Sorry, I don't know too much about scripts - but I was wondering if anyone one out there knew any ultra user friendly sites about writing "simple" scripts?
I have, after a lot of work have been able to mape network drives =
This is what I've done:
To map drives=
Batch File=
net use Z: \\Jupita\io$
net use G: \\aa_database_server\database
net use P: \\Mades\Pastel05
net use Q: \\Mades\PVSW
VBS Script=
Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "Z:" , "\\Jupiter\io$"
objNetwork.MapNetworkDrive "G:" , "\\aa_data_server\database"
objNetwork.MapNetworkDrive "P:" , "\\hades\Pastel05"
objNetwork.MapNetworkDrive "Q:" , "\\hades\PVSW"
It seems to work but I know there is more to it - like how to delete drives that are already in use. Any help on that would be great.
But I would like to push shortcuts which are on a server out to users' desktops - in some case all users:
The shortcut is on a server and the path is G:\Distribn\
Any help would be much appreciated.
Thanks in advance
Hope all is well.
Sorry, I don't know too much about scripts - but I was wondering if anyone one out there knew any ultra user friendly sites about writing "simple" scripts?
I have, after a lot of work have been able to mape network drives =
This is what I've done:
To map drives=
Batch File=
net use Z: \\Jupita\io$
net use G: \\aa_database_server\database
net use P: \\Mades\Pastel05
net use Q: \\Mades\PVSW
VBS Script=
Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "Z:" , "\\Jupiter\io$"
objNetwork.MapNetworkDrive "G:" , "\\aa_data_server\database"
objNetwork.MapNetworkDrive "P:" , "\\hades\Pastel05"
objNetwork.MapNetworkDrive "Q:" , "\\hades\PVSW"
It seems to work but I know there is more to it - like how to delete drives that are already in use. Any help on that would be great.
But I would like to push shortcuts which are on a server out to users' desktops - in some case all users:
The shortcut is on a server and the path is G:\Distribn\
Any help would be much appreciated.
Thanks in advance
16 years 6 months ago #26224
by ikon
Replied by ikon on topic Re: Using Scripts to Map Shortcuts
"net use /delete x:"
put this line and lines for other drive letters at the start of you script.
there are scripts to do most things, off the top of my head you can create shortcuts and drop them in the Desktop of the "All Users" profile.
put this line and lines for other drive letters at the start of you script.
there are scripts to do most things, off the top of my head you can create shortcuts and drop them in the Desktop of the "All Users" profile.
16 years 6 months ago #26225
by asab
Replied by asab on topic Re: Using Scripts to Map Shortcuts
Thanks for the reply ikon - much appreciated.
Dropping the shortcuts into the desktop of all users is what I want to do. I just wish I knew how to do it - a specific shortcut - moving it from the server to the desktop of a user. Any help on this would be great.
Thanks in advance.
Dropping the shortcuts into the desktop of all users is what I want to do. I just wish I knew how to do it - a specific shortcut - moving it from the server to the desktop of a user. Any help on this would be great.
Thanks in advance.
16 years 6 months ago #26228
by asab
Replied by asab on topic Re: Using Scripts to Map Shortcuts
Just to give more info on what I'm trying to do=
I'm trying to find the best way to add a shortcut to a database on all users who log into the domain.
I need something that will delete the old shortcut and recreate a new one.
Any help would be much appreciated.
Thanks in advance.
I'm trying to find the best way to add a shortcut to a database on all users who log into the domain.
I need something that will delete the old shortcut and recreate a new one.
Any help would be much appreciated.
Thanks in advance.
16 years 6 months ago #26229
by TheBishop
Replied by TheBishop on topic Re: Using Scripts to Map Shortcuts
If you create a shortcut on your server this will exist as a .lnk file, and as long as you make all the details in the shortcut generic (i.e. so it will work no matter what machine it is on) you can then copy it. One way is to have the login script do this; it can easily delete the old shortcut (on the local machine under all users desktop for example) then copy in a new one. A development for this is to have a login script with a series of sections, each of which tests whether the user is a member of a domain group. If they are a member then the script copies over the appropriate shortcut for the application or facility
16 years 6 months ago #26232
by asab
Replied by asab on topic Re: Using Scripts to Map Shortcuts
I think this might be too technical for me to do - this is the first time I'm dealing with scritps.
This is what I've doen so far to push shortcuts out=
rem - Downloading New AA Database
xcopy "\\aa_data_server\database\loginscript\AA Database.exe" "C:\Documents and Settings\Miah_as\Desktop"
xcopy "\\aa_data_server\database\loginscript\Microsoft Word.exe" "C:\Documents and Settings\Miah_as\Desktop"
echo off
echo .
echo .
echo Download complete! Click on X button to close this window!
and this is the result which I'm getting=
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
Z:\>rem - Downloading New AA Database
Z:\>
Z:\>
Z:\>
Z:\>xcopy "\\aa_data_server\database\loginscript\AA Database.exe" "C:\Documents
and Settings\Miah_as\Desktop"
File not found - AA Database.exe
0 File(s) copied
Z:\>xcopy "\\aa_data_server\database\loginscript\Microsoft Word.exe" "C:\Documen
ts and Settings\Miah_as\Desktop"
File not found - Microsoft Word.exe
0 File(s) copied
Z:\>
Z:\>echo off
echo .
.
echo .
.
echo Download complete! Click on X button to close this window!
Download complete! Click on X button to close this window!
For some reason it's not finding the files.
Any help please.
Thanks in advance
This is what I've doen so far to push shortcuts out=
rem - Downloading New AA Database
xcopy "\\aa_data_server\database\loginscript\AA Database.exe" "C:\Documents and Settings\Miah_as\Desktop"
xcopy "\\aa_data_server\database\loginscript\Microsoft Word.exe" "C:\Documents and Settings\Miah_as\Desktop"
echo off
echo .
echo .
echo Download complete! Click on X button to close this window!
and this is the result which I'm getting=
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
Z:\>rem - Downloading New AA Database
Z:\>
Z:\>
Z:\>
Z:\>xcopy "\\aa_data_server\database\loginscript\AA Database.exe" "C:\Documents
and Settings\Miah_as\Desktop"
File not found - AA Database.exe
0 File(s) copied
Z:\>xcopy "\\aa_data_server\database\loginscript\Microsoft Word.exe" "C:\Documen
ts and Settings\Miah_as\Desktop"
File not found - Microsoft Word.exe
0 File(s) copied
Z:\>
Z:\>echo off
echo .
.
echo .
.
echo Download complete! Click on X button to close this window!
Download complete! Click on X button to close this window!
For some reason it's not finding the files.
Any help please.
Thanks in advance
Time to create page: 0.140 seconds