![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | drag and drop - registry entry Could you please tell me what's the correct value for this registry entry? HKEY_CURRENT_USER\Software\Classes\Applications\wscript.exe\shell\open\command I have "C:\WINDOWS\system32\wscript.exe" "%1" "%*" But it must be wrong because if I drop the file "this is a test.txt" on a vbs I have objArgs(0) equal to -this- I set this value of the registry when I had troubles after installation of sp3. I'm writing a script to create an htm from a txt. I need it to read txt's on my phone which supports only images and htm's. Thanks a lot. Giovanni -- Giovanni Cenati (Bergamo, Italy) Write to "Reventlov" at katamail com http://digilander.libero.it/Cenati (Esempi e programmi in VbScript) -- |
My System Specs![]() |
| | #2 (permalink) |
| | Re: drag and drop - registry entry I have no such key under HKCU or under HKCR/HKLM. But I do have HKCR\vbsFile\Shell\Open\Command\ What I see there is: C:\WINDOWS\WScript.exe "%1" %* (It's all in quotes as viewed in Regedit, but the actual string is as above.) Quote: > Could you please tell me what's the correct value for this registry entry? > > nd Quote: > > I have > "C:\WINDOWS\system32\wscript.exe" "%1" "%*" > > But it must be wrong because if I drop the file "this is a test.txt" on a Quote: > objArgs(0) equal to -this- > > I set this value of the registry when I had troubles after installation Quote: > > I'm writing a script to create an htm from a txt. I need it to read txt's Quote: > which supports only images and htm's. > > Thanks a lot. > Giovanni > > > > -- > Giovanni Cenati (Bergamo, Italy) > Write to "Reventlov" at katamail com > http://digilander.libero.it/Cenati (Esempi e programmi in VbScript) > -- |
My System Specs![]() |
| | #3 (permalink) |
| | Re: drag and drop - registry entry Il giorno Fri, 24 Jul 2009 15:00:42 -0400, "mayayana" <mayaXXyana@xxxxxx> ha scritto: Quote: >I have no such key under HKCU or under >HKCR/HKLM. But I do have >HKCR\vbsFile\Shell\Open\Command\ > >What I see there is: > >C:\WINDOWS\WScript.exe "%1" %* > >(It's all in quotes as viewed in Regedit, but >the actual string is as above.) In that key I have (with no quotes) %SystemRoot%\System32\CScript.exe "%1" %* Which does not have any sense, as I have Wscript as default engine, not Cscript. Anyway, I stripped off the quotes from %*. I guess I have to restart now to see if it works. I'll tell you after the weekend. I fixed it in some other entries. So far it worked because I only used to rename picture files taken from the camera, whose files have no blanks in the names. Only today I found this problem. My txt2html script works only with filenames with no blanks. Giovanni -- Giovanni Cenati (Bergamo, Italy) Write to "Reventlov" at katamail com http://digilander.libero.it/Cenati (Esempi e programmi in VbScript) -- |
My System Specs![]() |
| | #4 (permalink) |
| | Re: drag and drop - registry entry On Jul 24, 2:29*pm, no...@xxxxxx (Reventlov) wrote: Quote: > Could you please tell me what's the correct value for this registry entry? > > HKEY_CURRENT_USER\Software\Classes\Applications\wscript.exe\shell\open\command > > I have > "C:\WINDOWS\system32\wscript.exe" "%1" "%*" > > But it must be wrong because if I drop the file "this is a test.txt" on avbs I have > objArgs(0) equal to -this- > > I set this value of the registry *when I had troubles after installation of sp3. > > I'm writing a script to create an htm from a txt. I need it to read txt'son my phone > which supports only images and htm's. > > Thanks a lot. > Giovanni > > -- > Giovanni Cenati (Bergamo, Italy) > Write to "Reventlov" at katamail comhttp://digilander.libero.it/Cenati(Esempi e programmi in VbScript) > -- extension to .htm might be sufficient to make the file display in many web browsers. The main problem with this approach would be that all new line marks would be ignored, but on a phone screen this might not be unacceptable. Tom Lavedas *********** |
My System Specs![]() |
| | #5 (permalink) |
| | Re: drag and drop - registry entry Il giorno Fri, 24 Jul 2009 15:00:42 -0400, "mayayana" <mayaXXyana@xxxxxx> ha scritto: Quote: >I have no such key under HKCU or under >HKCR/HKLM. But I do have >HKCR\vbsFile\Shell\Open\Command\ > >What I see there is: > >C:\WINDOWS\WScript.exe "%1" %* > >(It's all in quotes as viewed in Regedit, but >the actual string is as above.) it works now. Now I can save short stories from sf groups in txt format and easily change them to html texts. I put them on the phone and read something in waiting rooms when I cannot watch my favourite mp4 spiderman cartoons. Giovanni ---------------------------------------------------- 'Txt2Html 'Trasforma un txt in un testo html 'Cenati Giovanni 'Http://digilander.libero.it/Cenati '24/7/2009 Const ForReading = 1 'Open a file for reading only. You can't write to this file Const ForWriting = 2 'Open a file for writing Titolo="txt to html" Set objArgs = WScript.Arguments if objargs.count=0 then MsgBox "Drop a txt file on the icon",vbinformation+vbokonly,Titolo wscript.quit end if NomeTxt=objArgs(0) Content=File_ReadEntireFile(NomeTxt) Content=Replace(Content,"<","<") Content=Replace(Content,vbCrLf,"<br>") Content="<html><title>"&NomeTxt&"</title><body>"&Content&"</body></html>" Ok=File_WriteLine( NomeTxt & ".htm", Content ) If ok<>True Then MsgBox "Cannot save",,Titolo WScript.Quit '------------------------------------------------------------------------ ' string File_ReadEntireFile( sFileName ) '------------------------------------------------------------------------ ' Legge l'intero Contenuto del file ' Ritorna il testo letto '------------------------------------------------------------------------ Function File_ReadEntireFile( ByVal sFileName ) Dim opfs, fp, retstring On Error Resume Next File_ReadEntireFile = "" Set opfs = CreateObject("Scripting.FileSystemObject") if Err <> 0 then Exit Function end if Set fp = opfs.OpenTextFile( sFileName, ForReading, False ) if Err <> 0 then set opfs = nothing Exit Function end if retstring = fp.Readall fp.Close set opfs = nothing File_ReadEntireFile = retstring Err.Clear On Error Goto 0 End Function '------------------------------------------------------------------------ ' Bool File_WriteLine( sFileName, sData ) '------------------------------------------------------------------------ ' Crea il file sFileName ed aggiunge al file una riga ' Attenzione. Se il file esiste, lo ricrea ' Torna True se tutto ok '------------------------------------------------------------------------ Function File_WriteLine( ByVal sFileName, ByVal sData ) Dim opfs, fp On Error Resume Next File_WriteLine=False Set opfs = CreateObject("Scripting.FileSystemObject") if Err <> 0 then Exit Function end if Set fp = opfs.OpenTextFile( sFileName, ForWriting, true ) if Err <> 0 then set opfs = nothing Exit Function end if fp.WriteLine sData if Err <> 0 then set opfs = nothing Exit Function end if fp.Close File_WriteLine=True set opfs = nothing Err.Clear On Error Goto 0 End Function -- Giovanni Cenati (Bergamo, Italy) Write to "Reventlov" at katamail com http://digilander.libero.it/Cenati (Esempi e programmi in VbScript) -- |
My System Specs![]() |
| | #6 (permalink) |
| | Re: drag and drop - registry entry Il giorno Fri, 24 Jul 2009 13:03:35 -0700 (PDT), Tom Lavedas <tglbatch@xxxxxx> ha scritto: Quote: >I'm not certain what your problem is, but simply changing the >extension to .htm might be sufficient to make the file display in many >web browsers. The main problem with this approach would be that all >new line marks would be ignored, but on a phone screen this might not >be unacceptable. and this is interpreted as the beginning of a html tag. The first stories I read on the phone seemed have no sense because some dialogs were missing. I only changed the extension as you suggest. So the script changes < with %lt; and vbcrlf with <br> I posted the script. Thank you. Giovanni. -- Giovanni Cenati (Bergamo, Italy) Write to "Reventlov" at katamail com http://digilander.libero.it/Cenati (Esempi e programmi in VbScript) -- |
My System Specs![]() |
| | #7 (permalink) |
| | Re: drag and drop - registry entry > Now I can save short stories from sf groups in txt format and easily change them to html Quote: > texts. I put them on the phone and read something in waiting rooms when I Quote: > favourite mp4 spiderman cartoons. on the waiting room TV. ![]() I'm still wondering about that Applications key, though. I have a few entries under my HKLM\HKCR version of that key, but I've never noticed it before. And I can't seem to find anything online that explains what those entries are for. I wonder if the string in that key will override the file extension key. In other words, if I had the following: HKCR\Applications\notepad.exe\shell\open\command\ HKCR\.txt default value: "txtfile" HKCR\txtfile\shell\open\command\ default value: notepad.exe... then which key takes precedence? I just tried opening a txt file with regmon running and don't see any sign that the Applications key was accessed. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| drag and drop | Vista General | |||
| Drag and Drop | Live Mail | |||
| No Drag and Drop? | Vista mail | |||
| Access denied trying to "md"? Drag & Drop is now drag, drop, OK, OK ???? | Vista installation & setup | |||