1. Can you use this ? Set Shell = CreateObject("WScript.Shell") DesktopPath = Shell.SpecialFolders("Desktop") Set link = Shell.CreateShortcut(DesktopPath & "\test.lnk") link.Arguments = "1 2 3" link.Description = "test shortcut" link.HotKey = "CTRL+ALT+SHIFT+X" link.IconLocation = "foo.exe,1" link.TargetPath = "c:\blah\foo.exe" link.WindowStyle = 3 link.WorkingDirectory = "c:\blah" link.Save
2. For this you can use "diskpart" if installed. Start cmd prompt and type diskpart <ENTER> If you finally see DISKPART> then you can use bat files for obtaining the hide/unhide process.
Let us know.
< Message edited by didorno -- 7/20/2005 5:46:08 AM >
still trying to figure out how to work with diskpart though :)
since u're good at this ... do u know a script to set the homepage of Internet Explorer to a certain URL ?
thanks again for the help.
quote:Originally posted by didorno
1. Can you use this ?
2. For this you can use "diskpart" if installed. Start cmd prompt and type diskpart <ENTER> If you finally see DISKPART> then you can use bat files for obtaining the hide/unhide process.
ahamami, I made a batch file OffBat.bat with the code
diskpart /s "X:\your path to\diskoff.txt"
I made a text file diskoff.txt with the lines :
REM DiskOff.txt
LIST VOLUME LIST DISK SELECT VOLUME N REMOVE letter=N
On the other hand are a batch file OnBat.bat with the code
diskpart /s "X:\your path to\diskon.txt"
and a text file DiskOn.txt with lines
rem DISKOn.txt
LIST VOLUME SELECT VOLUME=13 Assign letter=N
The line select volume=13 and the drive letter N have to be adapted to your configuration. If you type diskpart in the command prompt window and type list volume, you will find the correct volume values.
The hide command does not (always ?) remove the drive at once, but then after reboot.
Regards.
< Message edited by didorno -- 7/20/2005 5:48:00 AM >
ahamami, I made a batch file OffBat.bat with the code
I made a text file diskoff.txt with the lines :
On the other hand are a batch file OnBat.bat with the code
and a text file DiskOn.txt with lines
The line select volume=13 and the drive letter N have to be adapted to your configuration. If you type diskpart in the command prompt window and type list volume, you will find the correct volume values.
The hide command does not (always ?) remove the drive at once, but then after reboot.
ahamami, do you wish to make a shortcut by script comparable to a shortcut you can make by hand by dragging a drive from the windows explorer to for instance the desktop ?
didn't quite get ur question but i tried this and it worked fine :) thanks for ur quick reply though .. good day ..
Set Shell = CreateObject("WScript.Shell") DesktopPath = Shell.SpecialFolders("Desktop") Set link = Shell.CreateShortcut(DesktopPath & "\Work.lnk") link.Description = "Work" link.IconLocation = "C:\WINDOWS\system32\SHELL32.dll,9" link.TargetPath = "W:" link.WindowStyle = 3 link.WorkingDirectory = "W:" link.Save
quote:Originally posted by didorno
ahamami, do you wish to make a shortcut by script comparable to a shortcut you can make by hand by dragging a drive from the windows explorer to for instance the desktop ?