home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2004 September
/
PCWorld_2004-09_cd.bin
/
software
/
vyzkuste
/
stehujemewin
/
stehujemewin.exe
/
pcwSysFolds.HTA
< prev
next >
Wrap
Text File
|
2004-07-06
|
11KB
|
169 lines
<HTML><!--
Licence:
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
http://www.gnu.org/copyleft/gpl.html
Requirements:
Microsoft Windows 98/ME/2000/XP, IE 5.0, 5.5, 6.0
-->
<HEAD>
<TITLE>Skript PC WORLDu : Nastavenφ systΘmov²ch slo₧ek</TITLE>
<HTA:APPLICATION ID="pcwMyfiles" APPLICATIONNAME="pcwMyfiles" BORDER = "normal" CAPTION = "yes" SHOWINTASKBAR = "yes" SINGLEINSTANCE = "yes" SYSMENU = "yes" WINDOWSTATE = "normal" SCROLL = "no" SCROLLFLAT = "no" VERSION = "1.0" INNERBORDER = "no" SELECTION = "no" MAXIMIZEBUTTON = "no" MINIMIZEBUTTON = "no" NAVIGABLE = "no" CONTEXTMENU = "no" BORDERSTYLE = "normal" ICON="idg.ico"/>
<STYLE type="text/css">
body {font-family:Tahoma,Verdana,Arial,Geneva;font-size:14;background-color:Buttonface;}
table {font-family:Tahoma,Verdana,Arial,Geneva;font-size:14;}
</STYLE>
</HEAD>
<SCRIPT language="JScript">
//shell object
var wshShell = new ActiveXObject("WScript.Shell");
var strpersonal = "";
var strmypictures = "";
var strmymusic = "";
var strmyvideos = "";
var strmydesktop = "";
var strmystartmenu = "";
var strmystartprogs = "";
var strmystartup = "";
var strmytemplates = "";
var strmysendto = "";
var strmyfavorites = "";
var strmycookies = "";
var strmyhistory = "";
function main() {
//read paths from registry
try {
strpersonal = wshShell.RegRead("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Personal");
strmypictures = wshShell.RegRead("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\My Pictures");
}
catch(error){}
if (strmypictures == "") { strmypictures = strpersonal +"\\Obrßzky"; }
try {
strmymusic = wshShell.RegRead("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\My Music");
}
catch(error){}
if (strmymusic == "") { strmymusic = strpersonal +"\\Hudba"; }
try {
strmyvideos = wshShell.RegRead("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\My Video");
}
catch(error){}
if (strmyvideos == "") { strmyvideos = strpersonal +"\\Filmy"; }
try {
strmydesktop = wshShell.RegRead("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Desktop");
strmystartmenu = wshShell.RegRead("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Start Menu");
strmystartprogs = wshShell.RegRead("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Programs");
strmystartup = wshShell.RegRead("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Startup");
}
catch(error){}
if (strmystartup == "") { strmystartup = strmystartmenu +"\\Programme\\Autostart"; }
strmytemplates = wshShell.RegRead("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Templates");
strmysendto = wshShell.RegRead("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\SendTo");
strmyfavorites = wshShell.RegRead("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Favorites");
strmycookies = wshShell.RegRead("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Cookies");
strmyhistory = wshShell.RegRead("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\History");
MyMusic.value = strmymusic;
MyVideos.value = strmyvideos;
MyPictures.value = strmypictures;
MyDesktop.value = strmydesktop;
MyStartMenu.value = strmystartmenu;
MyStartProgs.value = strmystartprogs;
MyStartup.value = strmystartup;
MyTemplates.value = strmytemplates;
MySendTo.value = strmysendto;
MyFavorites.value = strmyfavorites;
MyCookies.value = strmycookies;
MyHistory.value = strmyhistory;
}
function save() {
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\\My Pictures",MyPictures.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\\My Music",MyMusic.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\\My Video",MyVideos.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\\Desktop",MyDesktop.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\\Start Menu",MyStartMenu.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\\Programs",MyStartProgs.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\\Startup",MyStartup.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\\Templates",MyTemplates.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\\SendTo",MySendTo.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\\Favorites",MyFavorites.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\\Cookies",MyCookies.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\\History",MyHistory.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\My Pictures",MyPictures.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\My Music",MyMusic.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\My Video",MyVideos.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Desktop",MyDesktop.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Start Menu",MyStartMenu.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Programs",MyStartProgs.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Startup",MyStartup.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Templates",MyTemplates.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\SendTo",MySendTo.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Favorites",MyFavorites.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Cookies",MyCookies.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\History",MyHistory.value,"REG_SZ");
alert("Zm∞ny budou zapsßny do registru");
//update window's content
main();
}
function browse(inputname) {
var objShell = new ActiveXObject("Shell.Application");
var ssfWINDOWS = 36;
var objFolder;
objFolder = objShell.BrowseForFolder(0, "Vyberte slo₧ku", 17);
if (objFolder != null) {
//this statement returns the selected folder as a value for 'inputname'
document.all.item(inputname).value = objFolder.items().item().Path;
}
}
</SCRIPT>
<BODY scroll=no onload="javascript:window.resizeTo(700, 600);main();">
<B>Obrßzky:</B><BR>
<INPUT type=Text ID="MyPictures" Name="MyPictures" size=78>
<INPUT Type=button Value="Zvolit" onclick="browse('MyPictures')">
<BR><B>Hudba:</B><BR>
<INPUT type=Text ID="MyMusic" size=78>
<INPUT Type=button Value="Zvolit" onclick="browse('MyMusic')">
<BR><B>Filmy:</B><BR>
<INPUT type=Text ID="MyVideos" size=78>
<INPUT Type=button Value="Zvolit" onclick="browse('MyVideos')">
<BR><b>Pracovnφ plocha:</b><BR>
<INPUT type=Text ID="MyDesktop" size=78>
<INPUT Type=button Value="Zvolit" onclick="browse('MyDesktop')">
<BR><B>Nabφdka Start:</B><BR>
<INPUT type=Text ID="MyStartMenu" size=78>
<INPUT Type=button Value="Zvolit" onclick="browse('MyStartMenu')">
<BR><b>Nabφdka Start/Programy:</b><BR>
<INPUT type=Text ID="MyStartProgs" size=78>
<INPUT Type=button Value="Zvolit" onclick="browse('MyStartProgs')">
<BR><B>Po spuÜt∞nφ:</B><BR>
<INPUT type=Text ID="MyStartup" size=78>
<INPUT Type=button Value="Zvolit" onclick="browse('MyStartup')">
<BR><b>èablony:</b><BR>
<INPUT type=Text ID="MyTemplates" size=78>
<INPUT Type=button Value="Zvolit" onclick="browse('MyTemplates')">
<BR><B>Odeslat:</B><BR>
<INPUT type=Text ID="MySendTo" size=78>
<INPUT Type=button Value="Zvolit" onclick="browse('MySendTo')">
<BR><b>OblφbenΘ:</b><BR>
<INPUT type=Text ID="MyFavorites" size=78>
<INPUT Type=button Value="Zvolit" onclick="browse('MyFavorites')">
<BR><B>Cookies:</B><BR>
<INPUT type=Text ID="MyCookies" size=78>
<INPUT Type=button Value="Zvolit" onclick="browse('MyCookies')">
<BR><b>Historie:</b><BR>
<INPUT type=Text ID="MyHistory" size=78>
<INPUT Type=button Value="Zvolit" onclick="browse('MyHistory')"><BR><BR>
<INPUT Type=button Value="Potvrdit" onclick="save()">
<INPUT Type=button Value="Konec" onclick="javascript:window.close();">
</BODY>
</HTML>