Jump to content

Recommended Posts

Posted

Im trying to create a vbs to autoload my preferences, but I cant seem to get the vbs to execute winrar so itll import my stuff...can someone check this and help me?

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "%ProgramFiles%\WinRAR\WinRAR.exe"
Wscript.Sleep 1000
WshShell.AppActivate "WinRAR - WinRAR"
Wscript.Sleep 500
WshShell.SendKeys "^s"
Wscript.Sleep 500
WshShell.SendKeys "+{TAB}"
Wscript.Sleep 500
WshShell.SendKeys "{LEFT 1}"
Wscript.Sleep 500
WshShell.SendKeys "{TAB}"
Wscript.Sleep 500
WshShell.SendKeys "{ENTER}"
Wscript.Sleep 500
WshShell.SendKeys "%{F4}"
Wscript.Sleep 500

Set WshShell = nothing
WScript.Quit()


Posted

and so are mine...when I ran it from my sfx archive (I rebuilt RAR Labs exe to include my key and settings), it does not load until I open winrar and goto settings...which is what the vbs script is supposed to do. Also, it says winrar will autoload you settings if you export it to the dir, but that isnt true either...the only sure method Ive found is by having settings.reg in your dir and click on settings in winrar (you dont actually change anything, you just view it really.

Its nice that it works for you that way...but it doesnt answer my question...I need to know why the vbs isnt running winrar.exe. I want to use a variable for it, if someone knows what Im missing, it would be great.

Posted

sorry about last post i got the wrong folder, but try this one should work, works for my itunes, so should work for your winrar

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "cmd /K cd %programfiles%\winrar & winrar.exe", 0, false

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...