Jump to content

Recommended Posts

Posted

Anyone know why certain windows commands dont work at the beginning of the RunOnceEx?

2 things in particular...

the VidChange program doesnt seem to be working... I have it as the very 1st thing in my runonce; the program is in my $$\System32 folder...

REG ADD %KEY%\000 /V 1 /D "1395VidChng.exe 1024x768x32@85 -q" /f

also, like the 3rd or 4th thing is trying to remove a folder...

REG ADD %KEY%\021 /V 3 /D "RD /S /Q %systemdrive%\OfficeTEMP" /f

it actually comes back with an error saying it cant find the program 'RD'.. its as though windows doesnt recognize it as a native command.

I know Ive had issues with VBScripts where because its so early in the runonce and windows hasnt 'fully booted' that many vb commands dont work, perhaps this is something like that issue?

any ideas?

Thanks guys.


Posted

The reason why RD and other DOS command like copy, and MD won't work in RunOnceEx like that is because they are DOS internal commands. You'll need to specify the command interpreter first (CMD /C). In your case.

REG ADD %KEY%\021 /V 3 /D "CMD /C RD /S /Q %systemdrive%\OfficeTEMP" /f

I'm not familiar with 1395VidChng.exe program. I think it has something to do with your 1024x768x32@85 argument.

Try enlosing that with quotes.

REG ADD %KEY%\000 /V 1 /D "1395VidChng.exe \"1024x768x32@85 -q\"" /f

Posted

Try This It A Edit Version Of My CleanUp Template.

I have It Set To Remove OfficeTemp, And Delete

This Vbs File. Cut And Paste This And Save As As OTCleanUp.cmd

echo off
cls
mode con: cols=55 lines=3
COLOR F3
TITLE REMOVE OfficeTEMP
> %Systemdrive%\CleanUp1.vbs echo Dim Garbage
>> %Systemdrive%\CleanUp1.vbs echo set Garbage = (CreateObject("Scripting.FileSystemObject"))
>> %Systemdrive%\CleanUp1.vbs echo msgbox "Starting Clean UP?",vbokonly+48,"Clean Up"
>> %Systemdrive%\CleanUp1.vbs echo wscript.sleep 500
>> %Systemdrive%\CleanUp1.vbs echo Garbage.DeleteFolder ("%Systemdrive%\OfficeTEMP")
>> %Systemdrive%\CleanUp1.vbs echo Delete=("%Systemdrive%\OfficeTEMP\")
>> %Systemdrive%\CleanUp1.vbs echo wscript.sleep 500
>> %Systemdrive%\CleanUp1.vbs echo Garbage.DeleteFile ("\CleanUp1.vbs")
>> %Systemdrive%\CleanUp1.vbs echo wscript.sleep 500
>> %Systemdrive%\CleanUp1.vbs echo Delete=("\CleanUp1.vbs")

start /w %Systemdrive%\CleanUp1.vbs
ECHO.
ping -n 2 127.0.0.1>nul | set/p = Processing Final Clean Up!
exit

Posted

The answer is quite simple really, for you first prob

REG ADD %KEY%\000 /V 1 /D "%windir%\system32\1395VidChng.exe" 1024x768x32@85 -q

and for your second prob, this should work...

REG ADD %KEY%\021 /V 3 /D "%windir%\system32\cmd.exe" RD /S /Q %systemdrive%\OfficeTEMP

the reason is, windows needs the program in qoutes in order to find it, and then any args come after the end qoute...

Posted

REG ADD %KEY%\000 /V 1 /D "%windir%\system32\1395VidChng.exe" 1024x768x32@85 -q

REG ADD %KEY%\021 /V 3 /D "%windir%\system32\cmd.exe" RD /S /Q %systemdrive%\OfficeTEMP

:crazy:

Those won't import correctly. Bare in mind, that REG is the program for this instance, and the quoted strings are imported into the registry. If it isn't surrounded in quotes, it won't get imported.

Posted

I think u dont need first one u can specify resolution in winnt.sif

[Display]BitsPerPel = 32

Vrefresh = 85

Xresolution = 1024

Yresolution = 768

For second put it in your cleanup.cmd if u have or put this kind.

REG ADD %KEY%\021 /V 3 /D "cmd /c RD /S /Q %systemdrive%\OfficeTEMP" /f

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...