Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to run a .vbs script under 64Bit. When I run this script manually it will execute properly, but when launched by something else, it will run under 32bit and won't execute properly.

Here's my script:

Set WshShell = CreateObject("WScript.Shell") 
WshShell.Run Chr(34) & "C:\Users\Chris Nicol\Documents\SlickRun Scripts\Zune\RunZune.bat" & Chr(34), 0
Set WshShell = Nothing

Basically I want to force the use of C:\windows\syswow64\cmd.exe, so that it will run correctly. I can't seem to get the syntax right and can't find help on this.

Here's the batch file and regedit file that I'm trying to execute:

RunZune.bat:

@ECHO OFF

regedit /s FeaturesOverride.reg
"C:\Program Files\Zune\Zune.exe"

exit

FeaturesOverride.reg:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Zune\Features]
"Channels"="US,CA"
"MusicVideos"="US,CA"
"Picks"="US,CA"
"Podcasts"="US,CA"
"QuickMixLocal"="US,CA"
share|improve this question
    
The wscript in syswow64 is going to be the 32-bit version of wscript. The 64-bit version is in windows/system32. I don't see why it would make a difference for this script though. Are you sure the "something else" that's executing it has permission to access the user folder? Are there any error messages when it fails to work? –  techie007 Jul 25 '11 at 21:44
    
Well it's not really that it fails, and it may be a permissions issue. The .bat that I'm running is running a .reg file to modify the registry before running zune.exe When I run the .vbs by double clicking it, everything works as expected, but launching it through SlickRun will not modify the registry, but will also not cause an error. –  Chris Nicol Jul 25 '11 at 21:46
    
I've update the question to include all the files I'm trying to execute –  Chris Nicol Jul 25 '11 at 21:52
    
Perhaps close SlickRun, find the SlickRun.exe file and set it's compatibility to "run as an administrator", then try it again as this should help avoid permissions problems. –  techie007 Jul 25 '11 at 22:01
    
SlickRun has an option for "Run As Administrator" and I've selected that. I've talked to the developer behind SlickRun and he feels it's probably more of a 64bit issue. His suggestion hasn't worked (run the script through a 64bit version of WScript). However, I'm trying to see if I can run the .bat in 64bit to see if that works –  Chris Nicol Jul 25 '11 at 22:05
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.