| View previous topic :: View next topic |
| Author |
Message |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Thu May 12, 2005 5:35 pm Post subject: windows xp problem |
|
|
hello
this works on 98 very well but it don't work on Xp any one know what i have to chnage to make it work...
| Code: |
REGISTRY WRITE, HCR, .ext, , File Description
REGISTRY WRITE, HCR, File Description, ,File Description
REGISTRY WRITE, HCR, File Description\DefaultIcon, , "c:\file.exe, 0"
REGISTRY WRITE, HCR, File Description\shell\open\command, , @chr(34)"c:\file.exe"@chr(34) @chr(34)%1@chr(34)
|
thanks _________________ Have a nice day  |
|
| Back to top |
|
 |
Hooligan VDS Developer


Joined: 28 Oct 2003 Posts: 480 Location: California
|
Posted: Thu May 12, 2005 5:56 pm Post subject: |
|
|
Try this:
| Code: | REGISTRY WRITE, HCR, .ext, , File Description
REGISTRY WRITE, HCR, File Description, ,File Description
REGISTRY WRITE, HCR, File Description\DefaultIcon, , "c:\file.exe, 0"
REGISTRY WRITE, HCR, File Description\shell\open\command, , @chr(34)"c:\file.exe"@chr(34) @chr(34)"%1"@chr(34)
|
(Deja vu!)
Hooligan _________________ Hooligan
Why be normal? |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Thu May 12, 2005 6:27 pm Post subject: |
|
|
humm still don't work the ext don't even have my program icon...however like i said it does work on 98 tho. _________________ Have a nice day  |
|
| Back to top |
|
 |
Hooligan VDS Developer


Joined: 28 Oct 2003 Posts: 480 Location: California
|
Posted: Thu May 12, 2005 11:09 pm Post subject: |
|
|
Hi tim,
Are you logged in to your computer with admin privileges?
Hooligan _________________ Hooligan
Why be normal? |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Fri May 13, 2005 12:18 am Post subject: |
|
|
Is it just the website( or my browser) or is there actually alot of spaces in your code?
Last edited by Aslan on Fri May 13, 2005 12:30 am; edited 1 time in total |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Fri May 13, 2005 12:23 am Post subject: |
|
|
Let's see what this does
| Code: | REGISTRY WRITE,HCR,.ext,,File Description
REGISTRY WRITE,HCR,File Description,,File Description
REGISTRY WRITE,HCR,File Description\DefaultIcon,,"c:\file.exe,0"
REGISTRY WRITE,HCR,File Description\shell\open\command,,"c:\file.exe "@chr(34)"%1"@chr(34) |
|
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Fri May 13, 2005 12:46 am Post subject: |
|
|
| Hooligan wrote: | Hi tim,
Are you logged in to your computer with admin privileges?
Hooligan |
yes _________________ Have a nice day  |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Fri May 13, 2005 12:47 am Post subject: |
|
|
| Aslan wrote: | Let's see what this does
| Code: | REGISTRY WRITE,HCR,.ext,,File Description
REGISTRY WRITE,HCR,File Description,,File Description
REGISTRY WRITE,HCR,File Description\DefaultIcon,,"c:\file.exe,0"
REGISTRY WRITE,HCR,File Description\shell\open\command,,"c:\file.exe "@chr(34)"%1"@chr(34) |
|
i took the spaces out same thing  _________________ Have a nice day  |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Fri May 13, 2005 2:22 am Post subject: |
|
|
This works on my XP PC
| Code: | # Set your variables
%%ext =
%%FileDescription =
%%path =
%%file =
REGISTRY WRITE,HCR,.%%ext,,%%FileDescription
REGISTRY WRITE,HCR,%%FileDescription,,%%FileDescription
REGISTRY WRITE,HCR,%%FileDescription\DefaultIcon,,@chr(34)%%path\%%file@chr(34)","0
REGISTRY WRITE,HCR,%%FileDescription\shell\open\command,,@chr(34)%%path\%%file@chr(34)" "@chr(34)"%1"@chr(34) |
How is your script using %1 ? |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Fri May 13, 2005 2:36 am Post subject: |
|
|
i'am not i just have this for the last line
| Code: |
%%var10 = @path(%0)
REGISTRY WRITE,HCR,test\shell\open\command,,%%var10"test.exe"
|
_________________ Have a nice day  |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Sat May 14, 2005 1:10 am Post subject: |
|
|
Here's a full example
| Code: | #Compile this script as "TestExample.exe"
If %1
goto START
Else
#Create file association and then exit
%%ext = test
%%FileDescription = EXAMPLE FILE
%%path = @path(%0)
%%file = TestExample.exe
REGISTRY WRITE,HCR,.%%ext,,%%FileDescription
REGISTRY WRITE,HCR,%%FileDescription,,%%FileDescription
REGISTRY WRITE,HCR,%%FileDescription\DefaultIcon,,@chr(34)%%path\%%file@chr(34)","0
REGISTRY WRITE,HCR,%%FileDescription\shell\open\command,,@chr(34)%%path\%%file@chr(34)" "@chr(34)"%1"@chr(34)
Goto Close
End
:START
Title CMDLINE OPTION EXAMPLE
DIALOG CREATE,CMDLINE OPTION EXAMPLE,-1,0,800,600
DIALOG ADD,LIST,LIST1,12,11,777,549
DIALOG ADD,BUTTON,Close,573,724,64,20,Close
DIALOG SHOW
List LOADFILE,LIST1,%1
List Seek,List1,0
List Insert,List1,This line was added by TestExample.exe at @datetime(ddddd tt)
:Evloop
wait event
goto @event()
:CloseBUTTON
:Close
exit |
1. Compile the above script as "TestExample.exe"
2. Run it once to create the file assiciation
3. Create a textfile and change the extention to ".test"
4. Open the .test file you just created and it will open TestExample and display the text in the test file plus add a line at the top.
5. Open a command prompt and enter the path to the exe plus any text file.` E.G. "C:\temp\TestExample.exe anyfile.txt" and it will open TestExample and display the text in the file plus add a line at the top.
This will demonstrates two uses passing a file (variable) to your program.
Note: You can also pass commands, variables, whatever, to your program, provided your code is set up to use them. You can also pass more than one variable to your program -> <path>\<yourapp> %1 %2 %3
This should work with VDS 3,4,5
Hope this helps |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sat May 14, 2005 3:02 am Post subject: |
|
|
thanks i will play with that
question tho shouldn't this still work on xp tho:
| Code: |
%%var10 = @path(%0)
REGISTRY WRITE,HCR,test\shell\open\command,,%%var10"test.exe"
|
_________________ Have a nice day  |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Sat May 14, 2005 5:42 pm Post subject: |
|
|
Yes
Remember @path(%0) is the path of the running executable.
If your script was compiled as "test.exe" @path(%0) will be the path to it
e.g. C:\myapps\test.exe @path(%0) will equal "C:\myapps\" |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sat May 14, 2005 5:49 pm Post subject: |
|
|
yup
i will play with it some more
thanks for the help _________________ Have a nice day  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|