evilvoice Posted December 8, 2004 Posted December 8, 2004 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 1000WshShell.AppActivate "WinRAR - WinRAR"Wscript.Sleep 500WshShell.SendKeys "^s"Wscript.Sleep 500WshShell.SendKeys "+{TAB}"Wscript.Sleep 500WshShell.SendKeys "{LEFT 1}"Wscript.Sleep 500WshShell.SendKeys "{TAB}"Wscript.Sleep 500WshShell.SendKeys "{ENTER}"Wscript.Sleep 500WshShell.SendKeys "%{F4}"Wscript.Sleep 500Set WshShell = nothingWScript.Quit()
Astalavista Posted December 8, 2004 Posted December 8, 2004 my winrar preferrences is stored in a reg file.did u know that?
evilvoice Posted December 8, 2004 Author Posted December 8, 2004 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.
hulala.[uk] Posted December 8, 2004 Posted December 8, 2004 sorry about last post i got the wrong folder, but try this one should work, works for my itunes, so should work for your winrarSet WshShell = WScript.CreateObject("WScript.Shell")WshShell.Run "cmd /K cd %programfiles%\winrar & winrar.exe", 0, false
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now