Jump to content

reporting windows 7 problem


microbious
 Share

Recommended Posts

recently i installed Windows 7 for testing purpose and ran into a problem while coding stuff.

1st problem :

unable to compile with options most of the time.

Solution 1:

Rename file to make name shorter.

For example:

3DsMax_2010 Starter will not work, i get build error unable to create the compiled archive.

but thats not every single time. i would say 99% of all ? Not sure

If i remove _ from file name i am able to build it, but i wasnt before.

Solution 2:

Take ownership of the folder in which script is compiled.

2nd problem

Once file is built i would place it into (where i need it to) create shortcut to this compiled .exe file and copy this shortcut to another folder that is located in another hard drive and i execute this shortcut but not by double clicking on it, but by executing it using program called Advanced Launcher from http://www.alentum.com/alaunch/ (take a look into it, its a very simple program and very cool for multiple shortcuts use)

Now the compiled program works just fine and a part of the code is to execute yet another application that is located in the same folder as the compiled EXE file. Problem is that using advanced launcher to execute shortcut program is not working unless i execute this shortcut by clicking the shortcut directly(not using advanced launcher)

I am not sure if u guys understand the second issue but am sure that once my compiled exe is executed then its no longer the advanced launcher issue anymore, yet somehow program wont work :D

Take a look at my screenshot and see what is going on.

post-49108-12533257472426_thumb.jpg

Picture 1 shows location of compiled sctipt

2 shows location of the shortcut for the script

3 shows that this shortcut is executed using Advanced launcher

Advanced launcher shows u folder content regardless of whats in there, it could be executable's or shortcuts or movies. This case i have shortcuts

4 shows how script looks like (very simple)

When i press Start nothing happens as if RunWait ("3dsmax.exe") was never executed unless i execute the shortcut by double clicking it

But as far as i see it, once script is executed it is not advanced launcher business any longer, am i wrong ?

Script has both IsAdmin ( ) and #RequireAdmin i dont understand what is wrong.

Maybe its possible that advance launcher is not passing rights to executed shortcuts ?

for example its not telling this shortcut that administrator is executed it or a user, instead it tells it that it its self has executed it therefore windows is blocking something :D

Am lost :D

Please help

Thanks in advance.

Also i found that autoit needs to separate environmental variables such as those leading to user profile folders for XP and Vista/Windows 7

I was working on my script few minutes ago and found it very confusing to navigate because most of them are same.

Even Vista/Windows7 are having same problem, for example CMD %USERSPROFILE% and %PROGRAMDATA% are same C:\ProgramData so looking into autoit environmental variables or Macro Reference - Directory i found that its very eazy to get lost :D

Edited by almostnotstupid
Link to comment
Share on other sites

Why can't you point Advanced Launcher to the program? But anyway, the scenario works for me on RTM build.

>>AutoIT executable on Drive G:

>>Shortcut on Desktop

>>Advanced Laucher program points to shortcut on Desktop (added manually to Toolbar)

FYI, %USERPROFILE% points to C:\Users\<username>

%PROGRAMDATA% points to C:\ProgramData

type SET at a command prompt and see where your variables are mapped

Edited by Varian
Link to comment
Share on other sites

well my advanced menu setup is simple, it loads folder content which is full of shortcuts that i use everyday.

All of those shortcuts leading to executables spread all over my 5 hard drive, this is the only one that dont want to work somehow.

All advanced launcher menus are setup as menu's to show folder content so i cant really point it to 1 executable because i want them all to be in one place as shortcuts, that way i can remove the shortcut without having to reconfigure advanced launcher but i did create a direct link from advanced launcher to my executable (compiled script) and i get same thing, its not executing the RunWait ("3dsmax.exe",@ScriptDir).

It even says @scriptDir so i have no idea what else can i do to make it work.

Thanks for idea

Link to comment
Share on other sites

Try this line:

RunWait(@ScriptDir & "\3dsmax.exe")

It is something in your Starter Script. Try adding a check in your starter script for testing

before the RunWait line, add Something like:

Local $var = "not found"
If FileExists(@ScriptDir & "\3dsmax.exe") Then $var = "found"
MsgBox(32, "3dsmax.exe is " & var, "Working Folder is " & @ScriptDir)

At least then you will have some feedback from the starter scipt anyway

Link to comment
Share on other sites

help file says

RunWait ( "filename" [, "workingdir" [, show_flag [, opt_flag ]]] )

so i did my code correct.

am not sure u understand the issue, program works if i execute shortcut manualy without having advanced launcher to execute it

if i double click shortcut everything works, if i click same shortcut in advanced launcher then it doesnt.

I would think it has something to do with operating system, foe example using CMD batch command u cannot copy dll files to system32 folder anymore, u actualy need to make a code autoit script that will have isadmin () in it to work, otherwise files wont be copied.

try cmd command like this

xcopy %SOURCE%\Extra\DLL %SystemDrive%\Windows\System32 /Y

not gonna work for windows 7 or vista due to some OS limitations i guess, allays need to run as administrator so i am thinking that if my shortcute executed by advanced launcher then maybe administrator right are not passed to executed shortcut so compiled script is not running as if administrator executed it ?

Man u i am clueless.

By the way i run same RTM as u

i also tried to replace exe of the program that script is executing, (3dsmax.exe) i replaced it with another program and named it same as 3dsmax.exe to avoid changing script. Result was it worked even by using advanced launcher so at this point i dont know whos problem is this, my autoit windows 7 or advanced launcher.

so confusing.

Link to comment
Share on other sites

compiled script works fine with XP but not for W7.

I would think it would work for Vista but somehow it just doesnt work with Windows 7 thats why i am reporting it as a bug i guess, maybe unsupported OS.

In anycase i went back to XP :D waiting for Windows 7 service pack 1 release, till then its just a test no matter what they say.

Link to comment
Share on other sites

compiled script works fine with XP but not for W7.

I would think it would work for Vista but somehow it just doesnt work with Windows 7 thats why i am reporting it as a bug i guess, maybe unsupported OS.

In anycase i went back to XP :D waiting for Windows 7 service pack 1 release, till then its just a test no matter what they say.

do you run 64bit win7?

then take a look at "Wow64DisableWow64FsRedirection" in autoit-help file

Link to comment
Share on other sites

no, its 32

script has nothing to do with OS architecture. well it does only if difference is determent but thats not the issue am sure 100%. Plus its not the function that has anything to do with execution of RunWait ("3dsmax.exe",@ScriptDir) ;RUN 3ds max.

The only thing i could think is that as previously posted on windows 7 forum, OS its self has problems executing even if administrator rights present. Simple tasks such as copy files to homedrive using command batch script is just not working even if u run it as administrator while being the only user (administrator, not some other named used) and all files and folders are added to ownership.

As i said before, if instead of runwait ("3dsmax.exe") i would put something else like runwait ("firefox.exe") that would be located in the same directory it would work, but runwait ("3dsmax.exe") works just fine with XP and not for W7

Weird :D

i mean look at the code.

This function is called from main GUI script once button is pressed.

Func buttonstart()
    GUISetState(@SW_HIDE)
TrayTip ("3Ds Max 2010 Restore", 'Files restored.' & @CRLF & 'Loading 3Ds Max 2010',3)
RunWait ("3dsmax.exe",@ScriptDir) ;RUN  3ds max
TrayTip ("STATUS", 'Removing any temporary files used',2)
Sleep (2000)
FileDelete (@TempDir & "\instsrv.exe")
ProcessClose ("FNPLicensingService.exe")
ProcessClose ("LMU.exe")
exit
EndFunc

there is nothing wrong and main GUI has both IsAdmin ( ) and #RequireAdmin.

Here is GUI script.

#RequireAdmin
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=icon.ico
#AutoIt3Wrapper_outfile=C:\Users\Administrator\Desktop\3DsMax_2010 Starter.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <buttonrestore.au3>
#include <buttonbackup.au3>
#include <buttonstart.au3>
IsAdmin ( )

FileInstall ("instsrv.exe",@TempDir & "\instsrv.exe",1)
FileInstall ("icon.ico",@TempDir & "\icon.ico",1)
TraySetIcon (@TempDir & "\icon.ico",1)
$Form1 = GUICreate("Max launcher",200,100)
$button1 = GUICtrlCreateButton ("BACKUP",0,0,60,40)
$button2 = GUICtrlCreateButton ("RESTORE",140,0,60,40)
$button3 = GUICtrlCreateButton ("START 3DS MAX",0,40,200,40)

GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
case $button1
buttonbackup()
case $button2
buttonrestore()
case $button3
buttonstart()

Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd

i dont see any possible issue here for one reason, it works with XP but not with W7.

Do u guys have any other ideas who or what might be the cause of this problem ?

Look at the buttonstart function and see that there is nothign that would prevent

RunWait ("3dsmax.exe",@ScriptDir) ;RUN 3ds max

from running, yet somehow in windows 7 it doesnt and in XP it does just the way it suppose to.

Ho ever i remember having to include administrator manifest for CMD script so that files will be copied to wuindows 7 system folder and it worked, but how would that work with autoit ?

administrator manifest was an option for cmd script bat to exe converter found here http://www.f2ko.de/English/b2e/index.php (this is very useful tool by the way).

Maybe if i create single batch run.bat that would say

3dsmax.exe

and compile it using this bat to exe converted with administrator manifest added then execute that instead of what i have it might work, but this is to much hustle and autoit should not require me to do such thing unless autoit has nothign to do with it at all (and this is where i dotn know who to blame)

Looks to me that once script is executed somehow administrator rights are not passed to executed object.

i just dont know what else to think.

thanks for replies.

Edited by almostnotstupid
Link to comment
Share on other sites

I had problems starting programms over autoit in windows 7 too.

I have disabled User Account Control (UAC) and the issue was gone.

Shure, it´s not the smart way to disable a security-feature and maybe it´s not the matter by your problem.

Maybe the RunAs Command would work..but haven´t time to test it.

PS: Sorry for bad english ^^

Edited by JoeyDeAuto
Link to comment
Share on other sites

I had problems starting programms over autoit in windows 7 too.

I have disabled User Account Control (UAC) and the issue was gone.

Thank you very much, i will give it a try ASAP.

Your English is perfect :D

EDIT:

Moving UAC slider down didn't help :D

i tested it any way i could and have to say its not autoit problem or advanced launcher, its 3dsmax its self 100% sure

:D

Edited by almostnotstupid
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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