Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Let the Script be started by Registry-Entry

Status
Not open for further replies.

MZU

Programmer
Jul 10, 2002
2
CH
I have a problem :

I want to programm a VBScript which can be started, from the context-menu, when you click the right mousebutton on a .pdf-File.
To do that, i have added an entry to the registry.
My VBScript must know the whole name of the .pdf-File. When i add a %1 to my registry-entry, the DOS-name of my .pdf-File gets added.
(command : wscript.exe D:\TEMP\mzu\Ablage.vbs %1)
Is there an other possibility (%2?), to get the whole windows-name of my file, or can i find this name with a function of my Script?

Can anyone help me?
Mirjam
 
This may be a very odd bug...

The following yield different results:

c:\windows\system32\wscript.exe c:\test.vbs "%1"
returns full path

wscript.exe c:\test.vbs "%1"
returns short path

%systemroot%\system32\wscript.exe c:\test.vbs "%1"
error: can't find the file you just opened (%1)

c:\test.vbs "%1"
error: not a valid Win32 application (doesn't pass thru the .vbs extension to wscript)

c:\windows\system32\wscript.exe c:\test.vbs %1
breaks the parameters up at the spaces

Ran these tests on Windows XP Pro OS. Basically, use the first method.

HtH,

Rob
robschultz@yahoo.com
-Focus on the solution to the problem, not the obstacles in the way.-
 
Thank you, thank you, thank you!!!!
You saved me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top